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: missing source maps for hoisted imports (fix #16355) #16356

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

smcenlly
Copy link

@smcenlly smcenlly commented Apr 5, 2024

Description

fixes #16355

Copy link

stackblitz bot commented Apr 5, 2024

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@sapphi-red sapphi-red added p3-downstream-blocker Blocking the downstream ecosystem to work properly (priority) feat: sourcemap Sourcemap support feat: ssr labels Aug 21, 2024
sapphi-red
sapphi-red previously approved these changes Oct 17, 2024
@sapphi-red
Copy link
Member

/ecosystem-ci run

@vite-ecosystem-ci
Copy link

@hi-ogawa
Copy link
Collaborator

I'm running some examples locally and 2nd import doesn't get hoisted?

  expect(await ssrTransformSimpleCode(`\
console.log(foo.bar);
console.log(foo2.bar);
import foo from 'libx';
import foo2 from 'liby';
`)).toMatchInlineSnapshot(`
  "const __vite_ssr_import_0__ = await __vite_ssr_import__("libx", {"importedNames":["default"]});
  console.log(__vite_ssr_import_0__.default.bar);
  console.log(__vite_ssr_import_1__.default.bar);
  const __vite_ssr_import_1__ = await __vite_ssr_import__("liby", {"importedNames":["default"]});


  "
`)

@sapphi-red
Copy link
Member

I'm running some examples locally and 2nd import doesn't get hoisted?

Thanks, I pushed a commit to fix that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat: sourcemap Sourcemap support feat: ssr p3-downstream-blocker Blocking the downstream ecosystem to work properly (priority)
Projects
Status: Approved
Development

Successfully merging this pull request may close these issues.

Source maps missing for hoisted imports for ssrTransforms
3 participants