diff --git a/packages/taro-webpack5-runner/src/plugins/MiniSplitChunksPlugin.ts b/packages/taro-webpack5-runner/src/plugins/MiniSplitChunksPlugin.ts index 59d2c5e4a0b0..219ab67e727a 100644 --- a/packages/taro-webpack5-runner/src/plugins/MiniSplitChunksPlugin.ts +++ b/packages/taro-webpack5-runner/src/plugins/MiniSplitChunksPlugin.ts @@ -711,7 +711,7 @@ export default class MiniSplitChunksPlugin extends SplitChunksPlugin { name: cacheGroupName, test: module => { if (!module.resource) { - return module._identifier === depInfo.identifier + return !!module._identifier && module._identifier === depInfo.identifier } return module.resource === depInfo.resource },