Since this commit they are using TerserPlugin instead of UglifyJsPlugin.
In current implementation you cannot override the instance of a specific plugin inside minimizer array. Plugins merge was implemented for plugins array but not for the rest.
If you'd like this functionality to be added, please open a feature request on github. PR is also welcome.
If you need it now and don't have time to wait for this feature the only option you have is overriding the whole optimization entry.
For this you have to:
Specify optimization: replace in mergeStrategies object in builder configuration
Define all the optimization configuration as it is defined in Angular along with your modifications inside your extra-webpack.config.js.
Angular optimization definitions can be found in
You can do it easily now with version 7.4.1. Just export a function in your config file, it will receive the original config and expected to return a modified config. You can do whatever you like with the config that you receive.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
@felipecarrillo100 , here are few insights:
TerserPlugin
instead ofUglifyJsPlugin
.minimizer
array. Plugins merge was implemented forplugins
array but not for the rest. If you'd like this functionality to be added, please open a feature request on github. PR is also welcome.optimization
entry. For this you have to:optimization: replace
inmergeStrategies
object in builder configurationextra-webpack.config.js
. Angular optimization definitions can be found inand in
You can do it easily now with version
7.4.1
. Just export a function in your config file, it will receive the original config and expected to return a modified config. You can do whatever you like with the config that you receive.