-
-
Notifications
You must be signed in to change notification settings - Fork 9.2k
[fix] error on HMR with es6 bundles #5862
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
Conversation
|
Thank you for your pull request! The most important CI builds succeeded, we’ll review the pull request soon. |
sokra
left a comment
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
lukeapage
left a comment
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.
I don’t think you can use window inside a web worker. Getting the global inside a es6 environment is difficult unless you know something about your environment.
|
sokra
left a comment
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.
Should use self in WebWorker
|
@Slashgear Thanks for your update. I labeled the Pull Request so reviewers will review it again. @sokra Please review the new changes. |
|
Thanks |
|
Hi @sokra in https://github.com/callstack/haul we use We can't change mode on demand, that would result in restarting of Webpack which is time-consuming. |


What kind of change does this PR introduce?
It's a bug fix.
Did you add tests for your changes?
Update test.
If relevant, link to documentation update:
N/A
Summary
We notice a bug in webpack HMR during our spike on creating es6 bundles.
Bug:
bootstrapdev bundle containes athisno longer bound towindow, so it was undefined.Fix:
windowinstead ofthisin both scripts templates.This bug was identifed in #5776
Does this PR introduce a breaking change?
No.
Other information
Fix #5776
Made with @Osirisxxl