Fix production webpack config for 7ebc84bec0

This commit is contained in:
Wu Cheng-Han 2016-10-20 17:23:11 +08:00
parent c54013d954
commit 0f4d712f91

View file

@ -18,7 +18,7 @@ module.exports = Object.assign({}, baseConfig, {
}), }),
new ExtractTextPlugin("[name].css"), new ExtractTextPlugin("[name].css"),
new webpack.optimize.CommonsChunkPlugin({ new webpack.optimize.CommonsChunkPlugin({
names: ["vendor", "public", "slide", "locale"], names: ["cover", "index", "pretty", "slide", "vendor"],
children: true, children: true,
async: true, async: true,
filename: '[name].js', filename: '[name].js',
@ -38,25 +38,25 @@ module.exports = Object.assign({}, baseConfig, {
}), }),
new HtmlWebpackPlugin({ new HtmlWebpackPlugin({
template: 'public/views/includes/header.ejs', template: 'public/views/includes/header.ejs',
chunks: ['vendor', 'locale'], chunks: ['vendor', 'cover'],
filename: path.join(__dirname, 'public/views/build/cover-header.ejs'), filename: path.join(__dirname, 'public/views/build/cover-header.ejs'),
inject: false inject: false
}), }),
new HtmlWebpackPlugin({ new HtmlWebpackPlugin({
template: 'public/views/includes/scripts.ejs', template: 'public/views/includes/scripts.ejs',
chunks: ['vendor', 'locale'], chunks: ['vendor', 'cover'],
filename: path.join(__dirname, 'public/views/build/cover-scripts.ejs'), filename: path.join(__dirname, 'public/views/build/cover-scripts.ejs'),
inject: false inject: false
}), }),
new HtmlWebpackPlugin({ new HtmlWebpackPlugin({
template: 'public/views/includes/header.ejs', template: 'public/views/includes/header.ejs',
chunks: ['vendor', 'public'], chunks: ['vendor', 'pretty'],
filename: path.join(__dirname, 'public/views/build/pretty-header.ejs'), filename: path.join(__dirname, 'public/views/build/pretty-header.ejs'),
inject: false inject: false
}), }),
new HtmlWebpackPlugin({ new HtmlWebpackPlugin({
template: 'public/views/includes/scripts.ejs', template: 'public/views/includes/scripts.ejs',
chunks: ['vendor', 'public'], chunks: ['vendor', 'pretty'],
filename: path.join(__dirname, 'public/views/build/pretty-scripts.ejs'), filename: path.join(__dirname, 'public/views/build/pretty-scripts.ejs'),
inject: false inject: false
}), }),