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

fetch is not part of common nodejs runtime #2

Open
martinheidegger opened this issue Dec 1, 2016 · 5 comments
Open

fetch is not part of common nodejs runtime #2

martinheidegger opened this issue Dec 1, 2016 · 5 comments

Comments

@martinheidegger
Copy link

fetch as used in src/request.ts#L54 is not part of the common nodejs runtime and returns in an error (making it difficult to use the backlog api)

@vvatanabe
Copy link
Member

Is it troublesome to use isomorphic-fetch as a dependent module ?

@martinheidegger
Copy link
Author

It should be part of the dependencies in the package.json. Using isomorphic-fetch without specified dependencies is not enough.

@vvatanabe
Copy link
Member

It's a dilemma. I also thought so in the early stages of development. However, recently fetch has already been implemented in modern browsers. Those browsers do not need the bundled fetch module in the library. So I did not include fetch module in package.json.

@martinheidegger
Copy link
Author

A polyfill needs to be available anyhow (since not all browsers implement it) and you could make a separate "no-fetch.js" that can be deeplinked using require('backlog-js/no-fetch').

@vvatanabe
Copy link
Member

you could make a separate "no-fetch.js" that can be deeplinked using require('backlog-js/no-fetch').

I see. That is a good idea. In the near future I will try to add that split implementation to this library. Thank you for a good suggestion 😄

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

No branches or pull requests

2 participants