|
|
@ -44,13 +44,16 @@ function reducePacks (data, into = {}) {
|
|
|
|
return into;
|
|
|
|
return into;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const entries = Object.assign(
|
|
|
|
|
|
|
|
{ locales: resolve('app', 'javascript', 'locales') },
|
|
|
|
|
|
|
|
localePacks,
|
|
|
|
|
|
|
|
reducePacks(core),
|
|
|
|
|
|
|
|
Object.keys(flavours).reduce((map, entry) => reducePacks(flavours[entry], map), {})
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
module.exports = {
|
|
|
|
module.exports = {
|
|
|
|
entry: Object.assign(
|
|
|
|
entry: entries,
|
|
|
|
{ locales: resolve('app', 'javascript', 'locales') },
|
|
|
|
|
|
|
|
localePacks,
|
|
|
|
|
|
|
|
reducePacks(core),
|
|
|
|
|
|
|
|
Object.keys(flavours).reduce((map, entry) => reducePacks(flavours[entry], map), {})
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
output: {
|
|
|
|
output: {
|
|
|
|
filename: '[name].js',
|
|
|
|
filename: '[name].js',
|
|
|
@ -67,11 +70,14 @@ module.exports = {
|
|
|
|
cacheGroups: {
|
|
|
|
cacheGroups: {
|
|
|
|
default: false,
|
|
|
|
default: false,
|
|
|
|
vendors: false,
|
|
|
|
vendors: false,
|
|
|
|
locales: {
|
|
|
|
common: {
|
|
|
|
name: 'locales',
|
|
|
|
name: 'common',
|
|
|
|
chunks: 'all',
|
|
|
|
chunks (chunk) {
|
|
|
|
minChunks: Infinity,
|
|
|
|
return !(chunk.name in entries);
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
minChunks: 2,
|
|
|
|
minSize: 0,
|
|
|
|
minSize: 0,
|
|
|
|
|
|
|
|
test: /^(?!.*[\\\/]node_modules[\\\/]react-intl[\\\/]).+$/,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|