diff options
author | Gô Shoemake <marrus-sh@users.noreply.github.com> | 2017-07-30 10:28:21 -0700 |
---|---|---|
committer | Ondřej Hruška <ondra@ondrovo.com> | 2017-07-30 19:28:21 +0200 |
commit | b61e3daf983d87c6d2de7e54d420c2e8f5a531e6 (patch) | |
tree | 97836a37b38cc664862f9a6ebda311e3410df09c /config/webpack | |
parent | 6ff084dbbb06e5c2f131546829066435f2bf8f8a (diff) |
Multiple frontend support (#110)
* Initial multiple frontend support * Removed unnecessary require() * Moved styles/images out of common
Diffstat (limited to 'config/webpack')
-rw-r--r-- | config/webpack/shared.js | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/config/webpack/shared.js b/config/webpack/shared.js index 98e864a66..425918d66 100644 --- a/config/webpack/shared.js +++ b/config/webpack/shared.js @@ -2,7 +2,7 @@ const { existsSync } = require('fs'); const webpack = require('webpack'); -const { basename, dirname, join, relative, resolve, sep } = require('path'); +const { basename, dirname, join, relative, resolve } = require('path'); const { sync } = require('glob'); const ExtractTextPlugin = require('extract-text-webpack-plugin'); const ManifestPlugin = require('webpack-manifest-plugin'); @@ -54,18 +54,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, // It doesn't make sense to use common chunks with multiple frontend support. }), ], |