Skip to content
This repository was archived by the owner on Apr 6, 2023. It is now read-only.

Commit 0b22079

Browse files
authored
fix(nuxt): ensure component dirs in node_modules have lower scanning priority (#6382)
1 parent 03cd671 commit 0b22079

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

packages/nuxt/src/components/module.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,11 @@ export default defineNuxtModule<ComponentsOptions>({
102102
}
103103
}).filter(d => d.enabled)
104104

105+
componentDirs = [
106+
...componentDirs.filter(dir => !dir.path.includes('node_modules')),
107+
...componentDirs.filter(dir => dir.path.includes('node_modules'))
108+
]
109+
105110
nuxt.options.build!.transpile!.push(...componentDirs.filter(dir => dir.transpile).map(dir => dir.path))
106111
})
107112

0 commit comments

Comments
 (0)