-
-
Notifications
You must be signed in to change notification settings - Fork 6.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
feat: rework dynamic-import-vars
#7756
Conversation
Hey! 👋 |
#7537 got merged. While I do not completely understand this PR, from a brief overview, I guess maybe instead of depending on the glob transform directly, maybe we could directly transform the code to vite/packages/vite/src/node/plugins/assetImportMetaUrl.ts Lines 52 to 57 in 330e0a9
|
92e1f49
to
88a2e7f
Compare
yes, this PR make the dynamicImport syntax to |
9a65f8e
to
79c1909
Compare
4ace630
to
5d11b74
Compare
Co-authored-by: Bjorn Lu <bjornlu.dev@gmail.com>
dynamic-import-vars
Co-authored-by: Bjorn Lu <bjornlu.dev@gmail.com>
Description
fix: #6992
Additional context
I think we can deps on
@rollup/dynamic-import-vars (dynamicImportToGlob)
to re-implement it.We can get some enhancements to dynamic import
es-module-lexer
instead of compiler. There should be an improvement in performance??raw
.@/${variable}
resolve path.Because we can make
dynamic import
use the code ofimport.meta.glob
🤔What is the purpose of this pull request?
Before submitting the PR, please make sure you do the following
fixes #123
).