Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SSR generates wrong code #6507

Closed
jaulz opened this issue Aug 19, 2022 · 3 comments
Closed

SSR generates wrong code #6507

jaulz opened this issue Aug 19, 2022 · 3 comments
Labels
🐞 bug Something isn't working scope: ssr

Comments

@jaulz
Copy link
Contributor

jaulz commented Aug 19, 2022

Vue version

3.2.37

Link to minimal reproduction

https://stackblitz.com/edit/vitejs-vite-vyjpyu?terminal=dev

Steps to reproduce

  1. Run yarn build:server
  2. Open dist/server/entry-server.js
  3. Search for resolveComponent("nested-test") (line 34)
  4. Compare call of ssrRenderSlot (line 43):
ssrRenderSlot(_ctx.$slots, name, {}, null, _push2, _parent2, _scopeId); // <-- wrong: it should not be "name" but "_ctx.name" instead
  1. With call of renderSlot (line 48)
renderSlot(_ctx.$slots, _ctx.name),

What is expected?

Both calls should refer to variable name but actually the second renderer refers to _ctx.name which is different.

What is actually happening?

It does not work as expected because the variable is undefined.

System Info

System:
    OS: macOS 11.4
    CPU: (8) arm64 Apple M1
    Memory: 93.53 MB / 16.00 GB
    Shell: 3.5.1 - /opt/homebrew/bin/fish
  Binaries:
    Node: 16.15.0 - ~/.nvm/versions/node/v16.15.0/bin/node
    Yarn: 3.2.2 - ~/.nvm/versions/node/v16.15.0/bin/yarn
    npm: 8.5.5 - ~/.nvm/versions/node/v16.15.0/bin/npm
  Browsers:
    Chrome: 104.0.5112.101
    Firefox: 100.0.1
    Safari: 14.1.1
  npmPackages:
    vue: 3.2.37 => 3.2.37

Any additional comments?

I downgraded to [email protected] as the lowest possible compatible version with the vite plugin but even there it didn't work.

@edison1105 edison1105 added 🐞 bug Something isn't working scope: ssr labels Aug 22, 2022
@edison1105
Copy link
Member

duplicate of #7095

@jaulz
Copy link
Contributor Author

jaulz commented Nov 29, 2022

@edison1105 great to hear 😊 will it be in the next release?

@LinusBorg
Copy link
Member

Nothing was fixed yet, this was just closed as a duplicate of another open issue.

@github-actions github-actions bot locked and limited conversation to collaborators Sep 17, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
🐞 bug Something isn't working scope: ssr
Projects
None yet
Development

No branches or pull requests

3 participants