Build errors with alias 'vue': 'vue/dist/vue.esm-bundler.js' #1753
Replies: 2 comments 1 reply
-
Moving to discussion, as it isn't a Vike bug. |
Beta Was this translation helpful? Give feedback.
0 replies
-
Sorry for the confusion (marking this as Vike bug)! Anyway, the info on the following page helped me solve the second issue: https://vike.dev/broken-npm-package Namely adding the following to ssr: {
noExternal: ['vue']
}, I tried the other suggested solution So to sum it up the following in ssr: {
noExternal: ['vue']
},
resolve: {
alias: [
{
find: /^vue$/,
replacement: 'vue/dist/vue.esm-bundler.js'
}
]
} |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Description
Hi guys,
I have a vue component that requires runtime compilation support in Vue and as suggested by the following warning in the browser console in dev mode:
first I added the following alias in
vite.config.js
:but I got the following error during build:
So I changed the alias to use a regex like this:
so that it doesn't affect the
@vue/server-renderer
import which helped me get pass the above error, however, I now get the following error during build:Everything works fine in dev mode.
Any suggestions how to solve this?
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions