Skip to content

Commit

Permalink
move commonsChunkPlugin into webpack.prod.conf.js
Browse files Browse the repository at this point in the history
  • Loading branch information
Ken Berkeley committed Oct 17, 2016
1 parent c14da0d commit d7534be
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 0 additions & 4 deletions build/webpack.base.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,10 +107,6 @@ module.exports = {
},
plugins: [
new NyanProgressPlugin(), // 进度条
new webpack.optimize.CommonsChunkPlugin({
// 公共代码分离打包
names: ['vendor', 'mainifest']
}),
new webpack.DefinePlugin({
'process.env': { // 这是给 React / Redux 打包用的
NODE_ENV: JSON.stringify('production')
Expand Down
4 changes: 4 additions & 0 deletions build/webpack.prod.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@ config.plugins.push(
}
}),
new webpack.optimize.OccurenceOrderPlugin(),
new webpack.optimize.CommonsChunkPlugin({
// 公共代码分离打包
names: ['vendor', 'mainifest']
}),
new ExtractTextPlugin('[name].[contenthash:6].css', {
allChunks : true // 若要按需加载 CSS 则请注释掉该行
}),
Expand Down

0 comments on commit d7534be

Please sign in to comment.