New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Why does the UglifyJsPlugin affect other loaders? #283
Comments
No opinions? 😸 |
Indeed I have. This need to be changed. The There are four options I have in mind:
The |
Makes sense. The |
Wow, this is quite unexpected! |
Lately, I was thinking about this again. This is still misleading for newcomers. Wouldn't it be better to remove all the minification stuff from the loaders? I think the best solution would be to have different plugins for all the various web-compatible output files, like |
That doesn't work for inlined files... i. e. CSS or HTML inlined into JS. Btw. This was changed in webpack. UglifyJs now only minimized js. A LoaderOptionsPlugin allows to switch on minimizing for loaders. |
I wholeheartedly agree with the issue, so it's great if this has been solved, but I haven't seen it for the stable (1.x.x) version. Has this only been solved for the beta version ? |
only in the 2.x version. It's a breaking change which cannot be done on 1.x version. |
And the content "JS" in the name of the plugin, all knocked me up, and I spent about two days in order to understand what was going on. in your html template I use camelCase attributes, and they all converted to lowercase. how many headaches I experienced you can not imagine. in the dev version all works, in the prod version all stops working. What generally uneducated programmer invented it? As if that is specially made to harm.(... |
It s kinda shame that even though it has JS in name, it forces all loaders into minimize option. Good point and kind of 'the answer' (?) when uglifyJS messes your production build (as it does in ours project) is that minification of css can be disabled using -minimize option on css-loader. Described here: It overwrites uglifyJS forceful minification mode and in our case, let production build work as should. Which points me to a thought:
Does uglifyJS minimize it twice or something? |
That's more of a question than an issue.
I was wondering why
optimize.minimize
has been removed in favor of the UglifyJsPlugin? I prefer plugins over big configuration options, but it seems not logically to me that the UglifyJsPlugin switches all other loaders (even those which don't generate JS) into min-mode.The text was updated successfully, but these errors were encountered: