From 56c5378939c6498d0440b3ed76a604523678073f Mon Sep 17 00:00:00 2001 From: Yukai Huang Date: Tue, 11 Oct 2016 17:15:06 +0800 Subject: Optimize viz.js async rendering through webpack chunk --- webpack.production.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'webpack.production.js') diff --git a/webpack.production.js b/webpack.production.js index f4125cec..1c54ae38 100644 --- a/webpack.production.js +++ b/webpack.production.js @@ -17,10 +17,11 @@ module.exports = Object.assign({}, baseConfig, { }), new ExtractTextPlugin("[name].css"), new webpack.optimize.CommonsChunkPlugin({ - name: "vendor", - filename: "vendor.bundle.js", - minChunks: Infinity, - }), + name: ["vendor", "public", "slide", "locale"], + async: true, + filename: '[name].js', + minChunks: Infinity + }) new webpack.DefinePlugin({ 'process.env': { 'NODE_ENV': JSON.stringify('production') -- cgit v1.2.3