lucleray/next-purgecss

Built-in CSS Support?

mattrothenberg opened this issue · 2 comments

Hello! Now that Next has built-in CSS support, I'm curious if it's totally necessary to use @zeit/next-css in conjunction with this plugin? Note that running next build with that plugin specified leads to a warning.

$ next build
Warning: Built-in CSS support is being disabled due to custom CSS configuration being detected.
See here for more info: https://err.sh/next.js/built-in-css-disabled

If you're using Next.js built-in CSS support, you can use the @fullhuman/postcss-purgecss PostCSS plugin to remove unused CSS.

Here's an example with tailwindcss: https://github.com/zeit/next.js/blob/master/examples/with-tailwindcss/postcss.config.js.

@lucleray could you please put this in the readme document. So people wouldn't need to try to find an answer to this in the closed isssues like I'm doing at the moment.
I believe you could also refactor the package due to the next.js' built-in css support.