fix(bridge): resolve vue from .nuxt, not node_modules (#4146)

This commit is contained in:
Daniel Roe 2022-04-07 10:04:10 +01:00 committed by GitHub
parent 4d6f77bae4
commit 0cbc9cb7cd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -60,12 +60,9 @@ export function setupAppBridge (_options: any) {
})
// Alias vue to have identical vue3 exports
addWebpackPlugin(VueCompat.webpack({
src: resolve(distDir, 'runtime/vue2-bridge.mjs')
}))
addVitePlugin(VueCompat.vite({
src: resolve(distDir, 'runtime/vue2-bridge.mjs')
}))
const { dst: vueCompat } = addTemplate({ src: resolve(distDir, 'runtime/vue2-bridge.mjs') })
addWebpackPlugin(VueCompat.webpack({ src: vueCompat }))
addVitePlugin(VueCompat.vite({ src: vueCompat }))
nuxt.hook('prepare:types', ({ tsConfig, references }) => {
// Type 'vue' module with composition API exports