Purgecss and process.env.NODE_ENV #1487
anonimusprogramus
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
For new users who follow
(1) this documentation to use Webpack, and then
(2) this documentation to use Purgecss,
there's a chance when building for production, the final css won't be purged, the size still big (800+ KiB) .
The reason is that checking
process.env.NODE_ENV === 'production'
failed.There's a good simple explanation and solution here. And here's a sample package json script.
Hope it helps.
Beta Was this translation helpful? Give feedback.
All reactions