mirror of
https://github.com/nuxt/nuxt.git
synced 2025-01-18 09:25:54 +00:00
fix(nuxt3): only add ref if types were generated (#1606)
This commit is contained in:
parent
a8b969a4dd
commit
8ad5d89a15
@ -79,7 +79,9 @@ export default defineNuxtModule({
|
||||
})
|
||||
|
||||
nuxt.hook('prepare:types', ({ references }) => {
|
||||
references.push({ path: resolve(nuxt.options.buildDir, 'components.d.ts') })
|
||||
if (components.length) {
|
||||
references.push({ path: resolve(nuxt.options.buildDir, 'components.d.ts') })
|
||||
}
|
||||
})
|
||||
|
||||
// Watch for changes
|
||||
|
Loading…
Reference in New Issue
Block a user