You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Bun implementation of Function.toString differs from node, as described in oven-sh/bun#9543.
This causes the serialization of ssrRegisterHelper to output a incorrect string.
I'm suggesting this change:
constssrRegisterHelperCode=`import { useSSRContext } from "vue"\n`+`export const ssrRegisterHelper = ${ssrRegisterHelper.toString()}`;
Adding a const ssrRegisterHelper = in front of the function to make sure it gets the name for export.
2:46:16 PM [vite] Error when evaluating SSR module /src/components/HelloWorld.jsx: failed to import "/__vue-jsx-ssr-register-helper"|- Error: Expected ident
at getRollupError (/Users/tihav/source/nuxt-bun/bun-ssr-vue-jsx/node_modules/rollup/dist/es/shared/parseAst.js:377:15)
at convertProgram (/Users/tihav/source/nuxt-bun/bun-ssr-vue-jsx/node_modules/rollup/dist/es/shared/parseAst.js:1042:19)
at processTicksAndRejections (:13:78)
Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
Make sure this is a Vite issue and not a framework-specific issue. For example, if it's a Vue SFC related bug, it should likely be reported to vuejs/core instead.
Related plugins
plugin-vue
plugin-vue-jsx
Describe the bug
The Bun implementation of Function.toString differs from node, as described in oven-sh/bun#9543.
This causes the serialization of
ssrRegisterHelper
to output a incorrect string.I'm suggesting this change:
Adding a
const ssrRegisterHelper =
in front of the function to make sure it gets the name for export.Reproduction
https://github.com/luckydye/bun-ssr-vue-jsx
Steps to reproduce
bun install
bun --bun run dev
System Info
Used Package Manager
bun
Logs
Click to expand!
Validations
The text was updated successfully, but these errors were encountered: