fix bundle hanging

This commit is contained in:
Roman Hotsiy 2017-11-14 17:51:56 +02:00
parent 109d135959
commit 9bc44fd1ae
No known key found for this signature in database
GPG Key ID: 5CB7B3ACABA57CB0
2 changed files with 3 additions and 2 deletions

View File

@ -11,7 +11,7 @@
"dev": "webpack-dashboard -- webpack-dev-server --hot",
"test": "jest",
"bundle": "webpack",
"bundle:prod": "webpack -p -env.prod",
"bundle:prod": "webpack -p --env.prod",
"prettier": "prettier --write \"src/**/*.{ts,tsx}\""
},
"author": "",

View File

@ -81,11 +81,12 @@ module.exports = env => {
template: './demo/index.html',
}),
new webpack.NamedModulesPlugin(),
new DashboardPlugin(),
],
};
if (env.prod) {
config.plugins.push(new webpack.optimize.ModuleConcatenationPlugin());
} else {
config.plugins.push(new DashboardPlugin());
}
return config;
};