File tree 1 file changed +5
-4
lines changed
1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -19,8 +19,8 @@ module.exports = {
19
19
} ,
20
20
output : {
21
21
path : outPath ,
22
- filename : 'bundle .js',
23
- chunkFilename : '[chunkhash ].js'
22
+ filename : isProduction ? '[contenthash].js' : '[hash] .js',
23
+ chunkFilename : isProduction ? '[name].[contenthash].js' : '[name].[hash ].js'
24
24
} ,
25
25
target : 'web' ,
26
26
resolve : {
@@ -101,7 +101,8 @@ module.exports = {
101
101
vendors : {
102
102
test : / [ \\ / ] n o d e _ m o d u l e s [ \\ / ] / ,
103
103
chunks : 'all' ,
104
- priority : - 10
104
+ priority : - 10 ,
105
+ filename : isProduction ? 'vendor.[contenthash].js' : 'vendor.[hash].js'
105
106
}
106
107
}
107
108
} ,
@@ -114,7 +115,7 @@ module.exports = {
114
115
} ) ,
115
116
new WebpackCleanupPlugin ( ) ,
116
117
new MiniCssExtractPlugin ( {
117
- filename : '[contenthash].css' ,
118
+ filename : isProduction ? '[contenthash].css' : '[hash ].css',
118
119
disable : ! isProduction
119
120
} ) ,
120
121
new HtmlWebpackPlugin ( {
You can’t perform that action at this time.
0 commit comments