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

window not defined in web workers #104

Closed
piotrblasiak opened this issue Nov 14, 2018 · 2 comments · Fixed by #109
Closed

window not defined in web workers #104

piotrblasiak opened this issue Nov 14, 2018 · 2 comments · Fixed by #109

Comments

@piotrblasiak
Copy link

The problem seems to be in browsers.js:

module.exports = window.fetch || (window.fetch = require('unfetch').default || require('unfetch'));

And I think this could be solved by replacing window with global?

@developit
Copy link
Owner

global is also not defined. We can use `self.

@eric-burel
Copy link

I hit the same issue when building from TypeScript, should I use a fork with this PR merged?

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 a pull request may close this issue.

3 participants