-
-
Notifications
You must be signed in to change notification settings - Fork 6.3k
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(worker): import.meta.* #7706
Conversation
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.
Also The emitted file "assets/url-worker.f4391e1e.js.map" overwrites a previously emitted file of the same name.
warning happens in my environment.
resolved. 😊 |
sourcemap had a micro error. wait for a mins. |
done! |
This can be solved only by upgrading the target of esbuild
Rollup should set |
25d64fb
to
9e86745
Compare
I wonder what is your current assessment of this PR @poyoho. If we would like to avoid possible regressions, I think the best would be to queue it for Vite 3.0 (We may start the beta in around two weeks so I'm currently leaning towards this option). If there is some straightforward fix that you would like to extract from this PR to be applied in 2.9, maybe that is also an option. What do you think? 2.9 looks quite solid to me... maybe we should already start focusing our efforts in 3.0 |
In this PR, I reverted the Fix the following:
And about
This can be solved only by upgrading the target of esbuild.
Rollup should set Discussing this problem, we can ignore the classic worker because it can't work in dev. I think it can be preset that the user has already set a higher version of the target.
|
Co-authored-by: Bjorn Lu <bjornlu.dev@gmail.com>
@bluwy Thank for your review. |
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.
LGTM. Perhaps we can tackle the import.meta.url
replacement in a separate PR, or in Vite 3 when we preserve import.meta.url
.
I've done something similar, but it's really a little difficult |
the |
Description
fix: #7699
Additional context
import.meta.glob
will transform to dynamic import, so only supportformat: es
andmodule worker
.import.meta.globEager
will transform to static import, so only supportformat: iife|es
andmodule worker
.worker constructor
in nested worker and simple worker.What is the purpose of this pull request?
Before submitting the PR, please make sure you do the following
fixes #123
).