New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Build Cache with Webpack 5 and PostCSS-PurgeCSS #31441
Comments
Please verify that your issue can be recreated with Why was this issue marked with the
|
I am looking into this one. |
I tried to reproduce using the following config https://purgecss.com/guides/next.html#customize-postcss-configuration-next-js-9-3 but its working as expected. Can you please provide an example as per the instructions : |
Sorry I have very little time, December and January are a madhouse in the business world.
|
Looks like this is an issue with |
If you think about it, I think you will find that the problem is not with Webpack, and I would call this an anomaly. |
This closed issue has been automatically locked because it had no new activity for a month. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you. |
What version of Next.js are you using?
11 and 12 (only with Webpack 5)
What version of Node.js are you using?
14 and 16
What browser are you using?
does not matter
What operating system are you using?
Windows 10
How are you deploying your application?
SSG and/or Vercel Deploy via GitHub
Describe the Bug
The issue only occurs with Webpack 5. With Webpack 4 everything is fine.
node_modules
with@fullhuman/postcss-purgecss
PostCSS plugin.PostCSS
andPurgeCSS
work well.next build
, the purged CSS files are cached during the build.Example:
color-red
,color-blue
,color-green
color-red
class name on a html tag.next build
won't purgecolor-red
and will be cachednext build
will be purgecolor-blue
,color-green
and won't be cachedcolor-red
tocolor-blue
next build
thecolor-blue
selector doesn't exists in css filesExpected Behavior
Cache is always good, but should resolve that cache is updated when needed with Webpack 5.
To Reproduce
The issue only occurs with Webpack 5. With Webpack 4 everything is fine. See Example above.
The text was updated successfully, but these errors were encountered: