Skip to content

Commit

Permalink
+ async flag
Browse files Browse the repository at this point in the history
  • Loading branch information
lyyourc committed May 3, 2017
1 parent 4fb8417 commit dc549cc
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,15 @@ if (process.env.NODE_ENV === 'production') {
),
}),

new webpack.optimize.CommonsChunkPlugin({
async: 'common-in-lazy',
minChunks: ({ resource } = {}) => (
resource &&
resource.includes('node_modules') &&
/axios/.test(resource)
),
}),

new webpack.DefinePlugin({
'process.env': {
NODE_ENV: '"production"'
Expand Down

0 comments on commit dc549cc

Please sign in to comment.