diff --git a/packages/webpack/src/config/client.js b/packages/webpack/src/config/client.js index 6e964ee226..ee37e38477 100644 --- a/packages/webpack/src/config/client.js +++ b/packages/webpack/src/config/client.js @@ -98,6 +98,13 @@ export default class WebpackClientConfig extends WebpackBaseConfig { const prefix = nameMap[cacheGroup || 'default'] || cacheGroup return prefix + '/' + compactName } + + // Enforce name for all groups + for (const group of Object.values(cacheGroups)) { + if (group.name === undefined) { + group.name = true + } + } } return optimization