fix(nuxt3): only add ref if types were generated (#1606)

This commit is contained in:
Daniel Roe 2021-11-02 09:38:32 +00:00 committed by GitHub
parent a8b969a4dd
commit 8ad5d89a15
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -79,7 +79,9 @@ export default defineNuxtModule({
})
nuxt.hook('prepare:types', ({ references }) => {
if (components.length) {
references.push({ path: resolve(nuxt.options.buildDir, 'components.d.ts') })
}
})
// Watch for changes