mirror of
https://github.com/nuxt/nuxt.git
synced 2025-01-18 17:35:57 +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 }) => {
|
nuxt.hook('prepare:types', ({ references }) => {
|
||||||
|
if (components.length) {
|
||||||
references.push({ path: resolve(nuxt.options.buildDir, 'components.d.ts') })
|
references.push({ path: resolve(nuxt.options.buildDir, 'components.d.ts') })
|
||||||
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
// Watch for changes
|
// Watch for changes
|
||||||
|
Loading…
Reference in New Issue
Block a user