fix(bridge): add schema.d.ts to nuxt.d.ts (#3237)

This commit is contained in:
Daniel Roe 2022-02-16 17:49:31 +00:00 committed by GitHub
parent 60e672f335
commit 07c14b8704
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -48,6 +48,10 @@ export function setupAppBridge (_options: any) {
})))
addTemplate(schemaTemplate)
})
nuxt.hook('prepare:types', ({ references }) => {
// Add module augmentations directly to NuxtConfig
references.push({ path: resolve(nuxt.options.buildDir, 'types/schema.d.ts') })
})
// Alias vue to have identical vue3 exports
nuxt.options.alias['vue2-bridge'] = resolve(distDir, 'runtime/vue2-bridge.mjs')