MORE FRONTENDS (EASY MODE) WIN!!!

This commit is contained in:
kibigo!
2017-06-22 20:15:11 -07:00
parent 101a4c6913
commit b3904c2553
7 changed files with 16 additions and 14 deletions

View File

@@ -51,18 +51,7 @@ module.exports = {
}),
new webpack.optimize.CommonsChunkPlugin({
name: 'common',
minChunks: (module, count) => {
const reactIntlPathRegexp = new RegExp(`node_modules\\${sep}react-intl`);
if (module.resource && reactIntlPathRegexp.test(module.resource)) {
// skip react-intl because it's useless to put in the common chunk,
// e.g. because "shared" modules between zh-TW and zh-CN will never
// be loaded together
return false;
}
return count >= 2;
},
minChunks: Infinity
}),
],