diff options
author | Yukai Huang | 2016-10-11 17:15:06 +0800 |
---|---|---|
committer | Yukai Huang | 2016-10-11 17:15:06 +0800 |
commit | 56c5378939c6498d0440b3ed76a604523678073f (patch) | |
tree | a2ba61a6099a3192673687f22fb43bda2e198b5b /webpack.production.js | |
parent | d3315506dcb72ea4702842198d5c5c77549ed88b (diff) |
Optimize viz.js async rendering through webpack chunk
Diffstat (limited to 'webpack.production.js')
-rw-r--r-- | webpack.production.js | 9 |
1 files changed, 5 insertions, 4 deletions
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') |