Open mman opened 2 months ago
I see, I will fix soon
I think we will need a fix in html-webpack-plugin too, I will investigate tomorrow deeply and provide fixes for html-webpack-plugin too
You can fix it using test: /\.(js|css)$/,
, something wrong in manifest-webpack-plugin
(looks like a wrong hook)
Any progress on this one? How can I help?
Still on my roadmap, bug in webpack, I will fix soon
Bug report
Created an empty
npx create-react-app@latest webpack-compress-test
, added this plugin and broke the build.Looks like
CompressionPlugin
is racing withHtmlWebpackPlugin
and deletes original.js
files too early... beforeHtmlWebpackPlugin
gets a chance to process them.Steps to reproduce:
webpack.config.js
Now modify the
config/webpack.config.js
and enable compression plugin as the last step to compress everything.Actual Behavior
Build fails:
Expected Behavior
Build should succeed with all files being .gzipped
How Do We Reproduce?
See the detailed steps above.
The repo contains broken code: https://github.com/mman/webpack-compress-test The commit here enables the compression: https://github.com/mman/webpack-compress-test/commit/6ba1e3c9542994a0170747dcb12851e63d801119