Skip to content
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

Merged
merged 1 commit into from Oct 16, 2019

Conversation

@lemonmade
Copy link
Contributor

@lemonmade lemonmade commented Oct 16, 2019

This PR adds support for self as the globalObject when searching for async chunks. We use self 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 of self. Given that it is technically the default value, this seems like an appropriate inclusion to me.

@jsf-clabot
Copy link

@jsf-clabot jsf-clabot commented Oct 16, 2019

CLA assistant check
All committers have signed the CLA.

Copy link
Member

@valscion valscion left a comment

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")}}]);

This comment has been minimized.

@valscion valscion closed this Oct 16, 2019
@valscion valscion reopened this Oct 16, 2019
Update changelog
@valscion
Copy link
Member

@valscion valscion commented Oct 16, 2019

Thanks!

@valscion valscion merged commit ea074c1 into webpack-contrib:master Oct 16, 2019
2 checks passed
2 checks passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
licence/cla Contributor License Agreement is signed.
Details
@valscion
Copy link
Member

@valscion valscion commented Oct 16, 2019

Released in v3.6.0 ☺️

@lemonmade
Copy link
Contributor Author

@lemonmade lemonmade commented Oct 16, 2019

❤️ Thanks so much for the quick review/ release!

@lemonmade lemonmade deleted the lemonmade:fix-self-global-object branch Oct 16, 2019
@valscion
Copy link
Member

@valscion valscion commented Oct 16, 2019

Thanks for the contribution 😊. Happened to have a nice slot to review this PR today right as GitHub notification popped up 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants
You can’t perform that action at this time.