fix(nuxt3): auto import types (#1203)

This commit is contained in:
Daniel Roe 2021-10-18 20:30:14 +01:00 committed by GitHub
parent 225e3bafd4
commit 0b634e19a3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -85,7 +85,7 @@ export default defineNuxtModule<AutoImportsOptions>({
write: true, write: true,
getContents: () => `// Generated by auto imports getContents: () => `// Generated by auto imports
declare global { declare global {
${autoImports.map(i => ` const ${i.as}: typeof import('${r(i.as)}')['${i.name}']`).join('\n')} ${autoImports.map(i => ` const ${i.as}: typeof import('${r(i.from)}')['${i.name}']`).join('\n')}
}\nexport {}` }\nexport {}`
}) })
nuxt.hook('prepare:types', ({ references }) => { nuxt.hook('prepare:types', ({ references }) => {