File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -16,8 +16,7 @@ const isPlay = !!process.env.PLAY_ENV;
16
16
const webpackConfig = {
17
17
mode : process . env . NODE_ENV ,
18
18
entry : isProd ? {
19
- docs : './examples/entry.js' ,
20
- 'element-ui' : './src/index.js'
19
+ docs : './examples/entry.js'
21
20
} : ( isPlay ? './examples/play.js' : './examples/entry.js' ) ,
22
21
output : {
23
22
path : path . resolve ( process . cwd ( ) , './examples/element-ui/' ) ,
@@ -148,6 +147,16 @@ if (isProd) {
148
147
} ) ,
149
148
new OptimizeCSSAssetsPlugin ( { } )
150
149
) ;
150
+ // https://webpack.js.org/configuration/optimization/#optimizationsplitchunks
151
+ webpackConfig . optimization . splitChunks = {
152
+ cacheGroups : {
153
+ vendor : {
154
+ test : / \/ s r c \/ / ,
155
+ name : 'element-ui' ,
156
+ chunks : 'all'
157
+ }
158
+ }
159
+ } ;
151
160
webpackConfig . devtool = false ;
152
161
}
153
162
You can’t perform that action at this time.
0 commit comments