I'm using Asp Core +Angular 4 template + webpack in VS 2017. I've published my app ..and looking to ClientApp/dist/main-server.js I see the content is not uglify and minify..it is something like this
...
ConfirmComponent.prototype.ngAfterViewInit = function () {
try {
$('.modal').removeClass('fade');
setTimeout(function () {
$('.modal').addClass('fade');
}, 500);
}
catch (exception) { }
};
...
in webpack.config.vendor.js I can see a plugin call:
....
plugins: [
extractCSS,
new webpack.DllPlugin({
path: path.join(__dirname, 'wwwroot', 'dist', '[name]-manifest.json'),
name: '[name]_[hash]'
})
].concat(isDevBuild ? [] : [
new webpack.optimize.UglifyJsPlugin() //HERE
])
});
....
in package.json I've added: "uglifyjs-webpack-plugin": "1.0.1",
how to uglify and minify the code?
thanks