I want to minify my files using uglifyjs-webpack.
For example I have a source file core/js/test
and want to minify it and send it to min/js/test
.
Just using a source and respective output, how do I use it with webpack.
I want to minify my files using uglifyjs-webpack.
For example I have a source file core/js/test
and want to minify it and send it to min/js/test
.
Just using a source and respective output, how do I use it with webpack.
I often just use the
optimization: {minimize: true}
option (see this) since webpack 4.However, webpack still allows you to override the default implementation using the
UglifyjsWebpackPlugin
. I'd advise you to have a look at the docs in here, they seem to explain it quite alright.