-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
String exports aren't resolved on wildcard imports #5851
Labels
Comments
LorisSigrist
changed the title
String exports/imports aren't resolved on wildcard imports
String exports aren't resolved on wildcard imports
Jun 6, 2024
7 tasks
Thanks for the reproduction! This looks like an issue in Vite SSR, so I reported to there by adjusting your code |
hi-ogawa
added
upstream
p3-minor-bug
An edge case that only affects very specific usage (priority)
and removed
pending triage
labels
Jun 9, 2024
The fix was merged in vitejs/vite#17446 as part of 5.3.0, so if you update your Vite version manually or revalidate the lockfile, it should work. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
Describe the bug
JS allows you to export/import as arbitrary strings. However, in vitest, wildcard imports do not import these string-exports.
If this is executed via node it works as expected. If that same code is executed via vitest
undefined
is logged instead.Reproduction
https:/LorisSigrist/vitest-string-exports-wildcard-reproduction (basically the code example above)
System Info
System: OS: macOS 14.4.1 CPU: (14) arm64 Apple M3 Max Memory: 2.54 GB / 36.00 GB Shell: 5.9 - /bin/zsh Binaries: Node: 22.2.0 - /opt/homebrew/bin/node npm: 10.7.0 - /opt/homebrew/bin/npm pnpm: 9.1.4 - /opt/homebrew/bin/pnpm bun: 1.1.8 - /opt/homebrew/bin/bun Browsers: Safari: 17.4.1 npmPackages: vitest: ^1.6.0 => 1.6.0
Used Package Manager
pnpm
Validations
The text was updated successfully, but these errors were encountered: