-
-
Notifications
You must be signed in to change notification settings - Fork 490
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
Allow self for globalObject in async chunks #323
Allow self for globalObject in async chunks #323
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.
Yeah looks good to me! I'll close+reopen the PR so that CLA check goes green.
Can you add a changelog entry similar to what we have before, under the "UNRELEASED" section? This is an "Improvement" change
@@ -0,0 +1 @@ | |||
(self.webpackJsonp=self.webpackJsonp||[]).push([[27],{1:function(e,n,t){console.log("Chuck Norris")}}]); |
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.
😄
Update changelog
Thanks! |
Released in v3.6.0 |
❤️ Thanks so much for the quick review/ release! |
Thanks for the contribution 😊. Happened to have a nice slot to review this PR today right as GitHub notification popped up 😄 |
This PR adds support for
self
as theglobalObject
when searching for async chunks. We useself
for our client bundles because it supports both browsers and web workers, and we have some libraries that will create workers as child compilations of the client compile. Technically you can pass a lot more in here (as shown in #288, although more complex configuration like that is still not supported with my change), but this PR just adds auto-detection ofself
. Given that it is technically the default value, this seems like an appropriate inclusion to me.