Skip to content

Commit 506ecdc

Browse files
committed
split echarts into own file
1 parent 8886ab2 commit 506ecdc

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

build/webpack.prod.conf.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,14 @@ var webpackConfig = merge(baseWebpackConfig, {
8686
)
8787
}
8888
}),
89+
// split echarts into its own file
90+
new webpack.optimize.CommonsChunkPlugin({
91+
async:'echarts',
92+
minChunks(module) {
93+
var context = module.context;
94+
return context && (context.indexOf('echarts') >= 0 || context.indexOf('zrender') >= 0);
95+
}
96+
}),
8997
// extract webpack runtime and module manifest to its own file in order to
9098
// prevent vendor hash from being updated whenever app bundle is updated
9199
new webpack.optimize.CommonsChunkPlugin({

0 commit comments

Comments
 (0)