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: ensure build-less browser tests work with swivel-js v3 #102

Open
alexanderwende opened this issue Sep 28, 2022 · 0 comments
Open

fix: ensure build-less browser tests work with swivel-js v3 #102

alexanderwende opened this issue Sep 28, 2022 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@alexanderwende
Copy link
Contributor

the fetch module in internal uses cross-fetch, which shims the fetch method on node environments which don't yet support it

the problem occurs when running build-less es6 modules in browsers (during tests) when cross-fetch resolves itself to the /dist/browser-ponyfill.js which doesn't export the window's Request class:

https://github.com/Swivel-Finance/swivel-js/blob/v3/src/internal/fetch/index.ts#L55

@alexanderwende alexanderwende self-assigned this Sep 28, 2022
@alexanderwende alexanderwende added the bug Something isn't working label Sep 28, 2022
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

1 participant