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

Isomorphic unfetch is failing at runtime server side, window not defined #4

Closed
eric-burel opened this issue Sep 14, 2020 · 2 comments
Closed
Labels
bug Something isn't working

Comments

@eric-burel
Copy link
Collaborator

eric-burel commented Sep 14, 2020

developit/unfetch#104
developit/unfetch#122

We should either improve the typeScript/webpack build process.
Switching to cross-fetch does not work, as unfetch is probably also a dependency of a subpackage.

We might need to define window as global variable, set to undefined, in webpack.

@eric-burel eric-burel added the bug Something isn't working label Sep 14, 2020
@eric-burel eric-burel changed the title Isomorphic unfetch build is failing Isomorphic unfetch is failing at runtime server side, window not defined Sep 14, 2020
@developit
Copy link

FWIW the only way you'd be seeing window is if the build system here (I'm not familiar with it) is incorrectly following isomorphic-unfetch's "browser" package.json mainField.

@eric-burel
Copy link
Collaborator Author

Yeah the build was messy, I was bundling the full node_modules with webpack. I think now it works correctly but our build system is not yet mature.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants