8000 fix(meta): `@nuxt/ui` v4 component meta resolution · romhml/compodium@0794628 · GitHub 7FFF
[go: up one dir, main page]

Skip to content

Commit 0794628

Browse files
committed
fix(meta): @nuxt/ui v4 component meta resolution
1 parent 8661e25 commit 0794628

1 file changed

Lines changed: 6 additions & 5 deletions

File tree

‎packages/core/src/plugins/meta/checker.ts‎

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,18 @@ export function createChecker(dirs: ComponentsDir[]) {
99
{
1010
extends: `${rootDir}/tsconfig.json`,
1111
skipLibCheck: true,
12+
compilerOptions: {
13+
allowArbitraryExtensions: true // Fixes Nuxt UI component type resolution
14+
},
1215
include: [
1316
'**/*',
1417
...dirs?.map((dir: any) => {
1518
const path = typeof dir === 'string' ? dir : (dir?.path || '')
16-
if (path.endsWith('.vue')) {
17-
return path
18-
}
19-
return `${path}/**/*`
19+
const ext = path.split('.').pop()!
20+
return ['vue', 'ts', 'tsx', 'js', 'jsx'].includes(ext) ? path : `${path}/**/*`
2021
}) ?? []
2122
],
22-
exclude: []
23+
exclude: ['**/*.d.vue.ts']
2324
},
2425
{
2526
forceUseTs: true,

0 commit comments

Comments
 (0)
0