UglifyJsPlugin hangs on module building.
See original GitHub issueWhen building my application with webpack.optimize.UglifyJsPlugin({})
webpack consistently hangs at around 53% 267/366 build modules
. This seamed strange as I would expect it to hang at the optimising chunks stage (if at all).
When I comment https://github.com/webpack/webpack/blob/master/lib/optimize/UglifyJsPlugin.js#L139 I get a successful build. Oddly enough the sources seem to have been both mangled and minified.
Sadly I’m finding it hard to extract any debug information to move any further with this. Is there somewhere in the source I can add some logs to get a better idea of which module in my stack is causing the issue? I’ve tried context.resource
but deleting the code in the offending module doesn’t seem to effect the issue at all.
Issue Analytics
- State:
- Created 8 years ago
- Comments:7
Top Results From Across the Web
Production build hangs at 92% · Issue #272 · webpack-contrib ...
This error happens to me every time I tried to use UglifyJSPlugin . My dependencies: { "autodll-webpack-plugin": ">=0.3.9", "autoprefixer": "> ...
Read more >UglifyJSPlugin Out of memeory error while building
I have an angular 6 application I need to build I get the following error when I run. There a way to increase...
Read more >How to boost the speed of your webpack build?
A story of performance optimization and application of the Pareto principle for a webpack build that has become far too long.
Read more >How I solved and debugged my Webpack issue through trial ...
When webpack bundles your source code, it can become difficult to track down errors and warnings to their original location.
Read more >Tree-Shaking | Font Awesome Docs
For instance, when running a production build with Webpack 4, it might seem to hang for a long time with a status of:...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
+1 … just lost 6hrs of my life tracking down a similar issue caused by a loader when using
webpack -p
. The build was just stalling at “build modules” and no error, no timeout, no nothing. Just lovely time tracking it down in a serious dependency tree.Hi, found the issue that was causing this problem for us. It was a bad HTML template breaking the html-loader / html-minifier. A badly closed quote
"
in the source, was breaking things. Switching toraw
loader worked, allowing me to narrow in on the issue.When you enable
UglifyJsPlugin
, it also activates minification in all loaders that support minification (context.minimize
). So if you have similar issues when you enableUglifyJsPlugin
, or use-p
on the CLI, then I suggest you look at potential issues with all your loaders.I suggest that webpack should implement a timeout for each compiler process so that it can catch hanging plugins, and error accordingly. Ideally, webpack should’ve errored with a timeout such as: