Replies: 1 comment 1 reply
-
You need to set alias for alias: {
'vue': resolve(__dirname, '../node_modules/vue/dist/vue.esm-bundler.js'),
'vue/server-renderer': resolve(__dirname, '../node_modules/@vue/server-renderer/dist/server-renderer.esm-bundler.js'),
// node_modules/vue/server-renderer/index.mjs might also work the same
} (explicitly install |
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
Uh oh!
There was an error while loading. Please reload this page.
-
I need to include a component inside Vitepress page that uses runtime Vue renderer.
I have current config that allows it to run in Vitepress as long as it's just dev mode:
However, the issue arises at build time when SSR build is being produced:
Error: ENOENT: no such file or directory, open '***\node_modules\vue\dist\vue.esm-bundler.js\server-renderer'
Is there any way to add condition inside Vitepress config so that I can make
vue
alias to be only applied on client build?I've tried to use function for vite config so I can access
isSsrBuild
property but Vitepress only seem to support plain object.Beta Was this translation helpful? Give feedback.
All reactions