Closed
Description
Describe the bug
Vite is unable to SSR when using jsx/tsx style Vue components. I have been told by a Vue maintainer this is is because @vite/plugin-vue-jsx
is failing to inject modules into ssr context. Please see original issue for more context
Reproduction
Please provide a link to a repo that can reproduce the problem you ran into.
https://github.com/seanaye/vue3-tsx-tailwind
- clone
yarn
yarn dev
- open localhost:3000
Cannot read property forEach of undefined
I previously assumed this error came from renderToString
from @vue/server-renderer
, see line 16 of entry-server.ts
. Apparently this comes from the jsx plugin not injecting modules into ssr context.
System Info
vite
version: 2.0.0 beta 65- Operating System: Mac OS Big Sur M1 Chip
- Node version: 15.3.0
- Package manager (npm/yarn/pnpm) and version: yarn 1.22.10