diff --git a/src/compiler/bundle/ext-transforms-plugin.ts b/src/compiler/bundle/ext-transforms-plugin.ts index c345f0aa4f7..3e2665d5cc1 100644 --- a/src/compiler/bundle/ext-transforms-plugin.ts +++ b/src/compiler/bundle/ext-transforms-plugin.ts @@ -35,7 +35,7 @@ export const extTransformsPlugin = ( if (data.tag) { cmp = buildCtx.components.find((c) => c.tagName === data.tag); - const moduleFile = cmp && compilerCtx.moduleMap.get(cmp.sourceFilePath); + const moduleFile = cmp && !cmp.isCollectionDependency && compilerCtx.moduleMap.get(cmp.sourceFilePath); if (moduleFile) { const collectionDirs = config.outputTargets.filter(isOutputTargetDistCollection);