javascript - Minimize only one Webpack chunk -


i want minimize javascript code production. don't want minimize vendors' code because have minimize version.

my current webpack.config.js splits output code in 2 chunks.

module.exports = {      entry: {         vendor: ['jquery','angular'],         app: ['./client/app.start.js']     },     output: {         filename: 'bundle.js',         path: __dirname     },      resolve : {         alias : {             'angular' : 'angular/angular.min.js',             'jquery'  : 'jquery/dist/jquery.min.js'         }     },      plugins: [         new webpack.optimize.commonschunkplugin("vendor", "vendor.bundle.js"),         new webpack.optimize.uglifyjsplugin({minimize: true})     ] } 

when run >> webpack, both chunks ("bundle.js" , "vendor.bundle.js") minimized. how can configure webpack minimize "bundle.js"?

thanks

usually, have different configs (one uglify , without), production , development, minimize in production, if that's want.

you know this, thorough. may not know, webpack job better , recommended use untouched code , let webpack thing. don't believe uglifyjsplugin able target chunks, maybe there plugin it, unaware.

as side note, don't have worry double minification, adds small effect, considering production environment , doesn't change minute.


Comments

Popular posts from this blog

php - failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request -

java - How to filter a backspace keyboard input -

java - Show Soft Keyboard when EditText Appears -