Skip to content

Commit

Permalink
fix(plugin-jsx): work around bun bug for ssrRegisterHelper (#380)
Browse files Browse the repository at this point in the history
close #376
  • Loading branch information
luckydye authored Nov 11, 2024
1 parent 62b17f3 commit 9c2b620
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/plugin-vue-jsx/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@ export * from './types'
const ssrRegisterHelperId = '/__vue-jsx-ssr-register-helper'
const ssrRegisterHelperCode =
`import { useSSRContext } from "vue"\n` +
`export ${ssrRegisterHelper.toString()}`
// the const here is just to work around the Bun bug where
// Function.toString() isn't working as intended
// https://github.com/oven-sh/bun/issues/9543
`export const ssrRegisterHelper = ${ssrRegisterHelper.toString()}`

/**
* This function is serialized with toString() and evaluated as a virtual
Expand Down

0 comments on commit 9c2b620

Please sign in to comment.