Build the minified version in production mode
This is probably not the way to do this, I may want to just have multiple versions, dev+production * full+min
This commit is contained in:
parent
32f69339a5
commit
b1701b09bd
@ -29,11 +29,24 @@ module.exports = function createWebpackConfig(_options) {
|
||||
config.output.filename = options.filename;
|
||||
|
||||
if (options.minify) {
|
||||
config.plugins.push(new webpack.optimize.UglifyJsPlugin({
|
||||
compressor: {
|
||||
screw_ie8: true,
|
||||
},
|
||||
}));
|
||||
config.plugins.push(
|
||||
new webpack.optimize.UglifyJsPlugin({
|
||||
compressor: {
|
||||
screw_ie8: true,
|
||||
warnings: false,
|
||||
},
|
||||
})
|
||||
);
|
||||
}
|
||||
|
||||
if (options.env) {
|
||||
config.plugins.push(
|
||||
new webpack.DefinePlugin({
|
||||
'process.env': {
|
||||
NODE_ENV: JSON.stringify(options.env),
|
||||
},
|
||||
})
|
||||
);
|
||||
}
|
||||
|
||||
return config;
|
||||
|
@ -76,6 +76,7 @@ gulp.task('webpack:standalone:min', function() {
|
||||
var config = createWebpackConfig({
|
||||
filename: 'updeep-standalone.min.js',
|
||||
minify: true,
|
||||
env: 'production',
|
||||
});
|
||||
|
||||
return gulp.src('lib/index.js')
|
||||
|
Loading…
Reference in New Issue
Block a user