mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-22 21:55:11 +00:00
fix(nuxt3): auto import types (#1203)
This commit is contained in:
parent
225e3bafd4
commit
0b634e19a3
@ -85,7 +85,7 @@ export default defineNuxtModule<AutoImportsOptions>({
|
||||
write: true,
|
||||
getContents: () => `// Generated by auto imports
|
||||
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 {}`
|
||||
})
|
||||
nuxt.hook('prepare:types', ({ references }) => {
|
||||
|
Loading…
Reference in New Issue
Block a user