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(ssr): skip destructure assignment at overwrite import bindings #2417

Merged
merged 2 commits into from
Mar 15, 2021

Conversation

underfin
Copy link
Member

@underfin underfin commented Mar 7, 2021

fix #2409

@JeffSchofield
Copy link

Thank you for triage! I gave this a test this morning but I think there are still problems. In my repro, this fixes the replacement in the destructure assignment but the subsequent console.log(x) is still replaced. If you check the terminal it is logging inject instead of true. I believe the assignment in this case should prevent subsequent replacements within the scope.

@underfin
Copy link
Member Author

underfin commented Mar 9, 2021

Thanks for your report, I pushed a new commit to fixed it.

@yyx990803 yyx990803 merged commit 24c866f into vitejs:main Mar 15, 2021
@underfin underfin deleted the fix-ssr-overwrite-bindings branch March 16, 2021 05:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

SSR throws Syntax Error for valid JavaScript
3 participants