Closed markogresak closed 3 years ago
Update: I have upgraded the project to 12.8.0, and I have removed tailwind to avoid any external factors. Now using only randomly generated css. I have pushed the changes to the repo (link in my previous comment).
Still experiencing the same problem, css is not minified with wepback 5.
I have tested with nx 12.9.0 and the css is still not minified in production build.
This issue has been closed for more than 30 days. If this issue is still occuring, please open a new issue with more recent context.
Current Behavior
The output CSS is not minified when running the production build with webpack 5.
Expected Behavior
The CSS should be minified when using
--prod
orNODE_ENV=production
. The minification works with webpack 4.Steps to Reproduce
No, because that's using webpack 4. However, upgrading to webpack 5 would highlight the problem.
I have created a project to reproduce the problem: https://github.com/markogresak/nx-styles-bug#reproducing-the-css-minification-problem
It's a project where I've added only some randomly generated css to the output.
Failure Logs
As you can see, the output is not minified.
Environment