-
-
Notifications
You must be signed in to change notification settings - Fork 7.3k
fix(ssr): fix execution order of re-export #19841
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): fix execution order of re-export #19841
Conversation
/ecosystem-ci run |
commit: |
This comment was marked as outdated.
This comment was marked as outdated.
📝 Ran ecosystem CI on
✅ ladle, astro, analogjs, histoire, marko, nuxt, qwik, vite-plugin-cloudflare, vite-plugin-pwa, rakkas, vite-plugin-react-swc, unocss, previewjs, vite-plugin-svelte, vite-plugin-vue, sveltekit, quasar, react-router, vite-plugin-react, vite-setup-catalogue, vitest, vitepress, vuepress |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense to me 👍
Description
Currently re-export's
__vite_ssr_import__
position is preserved at the original code as it usesdefineImport(node.start, ...)
. I replaced it withdefineImport(hoistIndex, ...)
, so they'll get hoisted in the same way as normal imports.This fixes the test case added in #14468 as seen in the snapshot diff.
Additional note: rollup and rolldown's execution order likely work in the same way