Apply Uglify multiple times to the same code #364
Comments
@joecorkerton create two instance of plugin and put second instance after first |
@evilebottnawi and if I Otherwise what should I do instead of the second |
@joecorkerton just use: const UglifyJsPlugin = require('uglifyjs-webpack-plugin');
module.exports = {
//...
optimization: {
minimizer: [new UglifyJsPlugin(), new UglifyJsPlugin()]
}
}; You can define own options, also you can exclude/include chunks what should be do not uglify twice |
@evilebottnawi Thanks for your help so far. I have been playing around with different config options and it seems like I'm not able to disable mangle now. I set mangle to false and the output is still minified, with the same filesize. This seems to be the same issue as #234 . Is there a solution for that? Reading through the issue didn't help much |
@joecorkerton please create minimum reproducible test repo and describe what you have and what you expected, i can't understand you |
Elm is doing that to work around a bug in See parcel-bundler/parcel#2062 (comment) for the correct way to do it in both Terser and Uglify.
That's inefficient - that would parse and output the code twice. Instead just set the |
Is it possible to apply uglify twice to the same code? I need to do the webpack equivalent of
Why?
The text was updated successfully, but these errors were encountered: