Skip to content

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.

3 participants