Subscribe on changes!

SSR Usage in non-Node.js Environments no longer works

avatar
Mar 23rd 2021

Version

3.0.7

Reproduction link

https://github.com/ferdinando-ferreira/vue-next

Steps to reproduce

The full description of the issue (plus a fix for the issue) was submitted as a PR at https://github.com/vuejs/vue-next/pull/3460.

Here is the short summary

git clone git@github.com:ferdinando-ferreira/vue-next.git --single-branch vue-next-basic-renderer
cd vue-next-basic-renderer
yarn
yarn build
cd usecase
npm install
npm run build
npm run start:phpv8-current

It depends on php and phpv8 extension.

What is expected?

An example similar to what is described at https://ssr.vuejs.org/guide/non-node.html working as described

What is actually happening?

With the addition of renderToStream on server-renderer it is no longer possible to compile a SSR version for non Node environments


Submitted a PR (https://github.com/vuejs/vue-next/pull/3460) that fixes the issue

avatar
Apr 17th 2021

I'm also having issue with stream dependency. The thing is, I'm only importing renderToString, not renderToStream but, since the production build of @vue/server-renderer is CJS, Rollup cannot do the tree shake. Perhaps just providing an ESM build could work?