Optimize viz.js async rendering through webpack chunk

This commit is contained in:
Yukai Huang
2016-10-11 17:15:06 +08:00
parent d3315506dc
commit 56c5378939
8 changed files with 36 additions and 35 deletions

View File

@@ -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')