-
Notifications
You must be signed in to change notification settings - Fork 10.3k
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
Can't remove default plugins via webpack-configurator #3673
Comments
Yes, we hard-code uglify here:
What's the use case you have for removing it? |
A PR making Uglify overridable would be great 👍 |
@calcsam the hardcoded version of UglifyJsPlugin breaks on many dependencies such as punycode and moment. The alternative uglifyjs-webpack-plugin is using UglifyJS v3 ( @KyleAMathews I would love to create some pull requests, unfortunately, at this moment all my time is needed to optimize the build, which is still including 70% of not used bytes. (It would help if included stylesheets would only cover the first render, everything else (for other pages) can be loaded dynamically. In our case, we only need 90% of the styles on a management page when a user logged-in, but currently, they are included in every view. PurifyCSS doesn't help in this case) |
@vanbroup I'm using CSS-in-JS, I think it's builtin with Gatsby? It still hurts my eyes sometimes because I always cared to keep styles separate. But Gatsby changed the game. It makes now sense to keep it in your Templates, so only the styles that's really used get loaded. Since it's not inline css you don't need to worry about performance. I think I'll remember that's the preferred way Kyle use, so it can't be wrong 👍 |
Due to the high volume of issues, we're closing out older ones without recent activity. Please open a new issue if you need help! |
I'm trying to replace the default
UglifyJsPlugin
viaconfig.removePlugin
as specified in the webpack-configurator documentation:Unfortunately none of the above seem to work. I think because the UglifyJsPlugin is not loaded via the
config.plugin
system in webpack.config.js.I found an ugly workaround by updating the configuration and excluding all files:
The text was updated successfully, but these errors were encountered: