build config

This commit is contained in:
cookfront
2017-02-26 13:34:49 +08:00
parent 7bfc4f4323
commit fc572191cd
4 changed files with 40 additions and 7 deletions
+6
View File
@@ -10,4 +10,10 @@ config.output = {
libraryTarget: 'umd'
};
config.externals = {
vue: 'Vue'
};
delete config.devtool;
module.exports = config;
+6 -4
View File
@@ -3,13 +3,15 @@ var webpack = require('webpack');
config.output.filename = config.output.filename.replace(/\.js$/, '.min.js');
delete config.devtool;
config.plugins = [
new webpack.LoaderOptionsPlugin({
minimize: true,
debug: false
}),
new webpack.optimize.UglifyJsPlugin({
sourceMap: false,
drop_console: true,
comments: false,
compress: {
drop_console: true,
warnings: false
}
})
+6 -2
View File
@@ -88,8 +88,12 @@ if (process.env.NODE_ENV === 'production') {
}),
new ExtractTextPlugin(`yzvue_base_${version}_min.css`),
new webpack.optimize.UglifyJsPlugin({
compress: {warnings: false},
output: {comments: false},
compress: {
warnings: false
},
output: {
comments: false
},
sourceMap: false
}),
new webpack.LoaderOptionsPlugin({