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

fix(compiler-ssr): should generate the correct hoists expression #3537

Closed
wants to merge 1 commit into from
Closed

fix(compiler-ssr): should generate the correct hoists expression #3537

wants to merge 1 commit into from

Conversation

HcySunYang
Copy link
Member

@HcySunYang HcySunYang commented Apr 3, 2021

Fix: #3536

Looking at the test snapshot in this PR, you can see that it generated duplicate hoists expressions:

const _hoisted_2 = _imports_1
const _hoisted_3 = _imports_1

For the current implementation, this is expected. And I think @edison1105 's PR(#3215) can improve it

@HcySunYang HcySunYang added the 🔨 p3-minor-bug Priority 3: this fixes a bug, but is an edge case that only affects very specific usage. label Apr 3, 2021
@HcySunYang HcySunYang added ❗ p4-important Priority 4: this fixes bugs that violate documented behavior, or significantly improves perf. and removed 🔨 p3-minor-bug Priority 3: this fixes a bug, but is an edge case that only affects very specific usage. labels May 8, 2021
@yyx990803
Copy link
Member

Turns out we should not be hoisting when targeting SSR at all. See 3ef1fcc

@yyx990803 yyx990803 closed this May 24, 2021
@lukewarlow
Copy link

I've updated my test case to Vue 3.1.0-beta4 (https://github.com/lukewarlow/vue-server-render-bug) but I still experience the issue with incorrect srcset in the SSR output. Is there some change I need to make to my SSR code?

@yyx990803 @HcySunYang

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
❗ p4-important Priority 4: this fixes bugs that violate documented behavior, or significantly improves perf.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

@vue/server-renderer renderToString generating incorrect srcset URL for source elements within a router link
3 participants