mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-23 06:05: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,
|
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 }) => {
|
||||||
|
Loading…
Reference in New Issue
Block a user