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
SSR bundle is useful for environments such as workers, where there is no import or require at run time.
The bundle is generated correctly using Webpack or ESBuild but I could not make it work with Vite.
A related problem is that Vue imports Node's stream at the top of the bundle (it is used when calling renderToStream), which crashes the worker. It is currently necessary mocking the stream module in the bundler.
The text was updated successfully, but these errors were encountered:
Version
3.1.5
Reproduction link
https://github.com/frandiox/vite-vue-bundle-issue
Steps to reproduce
yarn && yarn build && yarn test
What is expected?
It should create a functional SSR bundle.
What is actually happening?
The created SSR bundle is missing
ssrUtils
so the app crashes since it tries to read a property ofnull
. It is likely related to this line: https://github.com/vuejs/vue-next/blob/3a75d5d6942a1743789192dca9161f7c30a71e58/packages/runtime-core/src/index.ts#L316SSR bundle is useful for environments such as workers, where there is no
import
orrequire
at run time.The bundle is generated correctly using Webpack or ESBuild but I could not make it work with Vite.
A related problem is that Vue imports Node's
stream
at the top of the bundle (it is used when callingrenderToStream
), which crashes the worker. It is currently necessary mocking thestream
module in the bundler.The text was updated successfully, but these errors were encountered: