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

Fix issue with window in worker #41

Merged
merged 2 commits into from
Jul 6, 2020
Merged

Fix issue with window in worker #41

merged 2 commits into from
Jul 6, 2020

Conversation

marcofugaro
Copy link
Member

@marcofugaro marcofugaro commented Jun 27, 2020

Using window in a worker throws an error, let's use globalThis instead.

Its browser support seems aligned with our browser support specified here.

Instead, if there is the need to support older browsers, we can easily transpile globalThis with babel by adding

useBuiltIns: 'usage',
corejs: { version: 3, proposals: true },

in the @babel/preset-env options and adding core-js as a dependency.

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

Successfully merging this pull request may close these issues.

2 participants