@@ -15,15 +15,15 @@ const webpackConfig = merge(baseWebpackConfig, {
15
15
module : {
16
16
rules : utils . styleLoaders ( {
17
17
sourceMap : config . build . productionSourceMap ,
18
- extract : true ,
19
- } ) ,
18
+ extract : true
19
+ } )
20
20
} ,
21
21
devtool : config . build . productionSourceMap ? '#source-map' : false ,
22
22
output : {
23
23
path : config . build . assetsRoot ,
24
24
publicPath : './' ,
25
25
filename : utils . assetsPath ( 'js/[name].[chunkhash:7].js' ) ,
26
- chunkFilename : utils . assetsPath ( 'js/[name].[chunkhash:7].js' ) ,
26
+ chunkFilename : utils . assetsPath ( 'js/[name].[chunkhash:7].js' )
27
27
} ,
28
28
optimization : {
29
29
minimizer : [
@@ -40,13 +40,13 @@ const webpackConfig = merge(baseWebpackConfig, {
40
40
// 移除 console
41
41
drop_console : true , // eslint-disable-line
42
42
// 移除无用的代码
43
- dead_code : true , // eslint-disable-line
43
+ dead_code : true // eslint-disable-line
44
44
} ,
45
45
ie8 : false ,
46
46
safari10 : true ,
47
47
warnings : false ,
48
- toplevel : true ,
49
- } ,
48
+ toplevel : true
49
+ }
50
50
} ) ,
51
51
new OptimizeCSSAssetsPlugin ( {
52
52
assetNameRegExp : / \. c s s $ / g,
@@ -65,11 +65,11 @@ const webpackConfig = merge(baseWebpackConfig, {
65
65
// 使用postcss的autoprefixer功能
66
66
autoprefixer : false ,
67
67
discardComments : {
68
- removeAll : true ,
69
- } ,
68
+ removeAll : true
69
+ }
70
70
} ,
71
- canPrint : true ,
72
- } ) ,
71
+ canPrint : true
72
+ } )
73
73
] ,
74
74
splitChunks : {
75
75
chunks : 'all' ,
@@ -81,30 +81,24 @@ const webpackConfig = merge(baseWebpackConfig, {
81
81
automaticNameDelimiter : '~' ,
82
82
cacheGroups : {
83
83
default : false ,
84
- brace : {
85
- name : 'ace' ,
86
- test : / [ \\ / ] n o d e _ m o d u l e s [ \\ / ] b r a c e [ \\ / ] / ,
87
- enforce : true ,
88
- priority : 10 ,
89
- } ,
90
84
common : {
91
85
name : 'vendor' ,
92
86
test : / [ \\ / ] n o d e _ m o d u l e s [ \\ / ] / ,
93
87
enforce : true ,
94
- priority : 9 ,
95
- } ,
96
- } ,
97
- } ,
88
+ priority : 9
89
+ }
90
+ }
91
+ }
98
92
} ,
99
93
plugins : [
100
94
// http://vuejs.github.io/vue-loader/en/workflow/production.html
101
95
new webpack . DefinePlugin ( {
102
- 'process.env' : env ,
96
+ 'process.env' : env
103
97
} ) ,
104
98
// extract css into its own file
105
99
new MiniCssExtractPlugin ( {
106
100
filename : utils . assetsPath ( 'css/[name].[contenthash:7].css' ) ,
107
- chunkFilename : '[name].css' ,
101
+ chunkFilename : '[name].css'
108
102
} ) ,
109
103
// generate dist index.html with correct asset hash for caching.
110
104
// you can customize output by editing /index.html
@@ -116,14 +110,14 @@ const webpackConfig = merge(baseWebpackConfig, {
116
110
minify : {
117
111
removeComments : true ,
118
112
collapseWhitespace : true ,
119
- removeAttributeQuotes : true ,
113
+ removeAttributeQuotes : true
120
114
// more options:
121
115
// https://github.com/kangax/html-minifier#options-quick-reference
122
116
} ,
123
117
// necessary to consistently work with multiple chunks via CommonsChunkPlugin
124
- chunksSortMode : 'dependency' ,
125
- } ) ,
126
- ] ,
118
+ chunksSortMode : 'dependency'
119
+ } )
120
+ ]
127
121
} ) ;
128
122
129
123
if ( config . build . bundleAnalyzerReport ) {
0 commit comments