axios-fetch icon indicating copy to clipboard operation
axios-fetch copied to clipboard

Do not require `node-fetch` for browser targets

Open AuHau opened this issue 2 years ago • 1 comments

Currently, the library solely depends on node-fetch for providing fetch primitives like Header class and so on.

We plan to use it in the browser context, where these primitives are provided by the runtime and we would like to avoid packing node-fetch because of it. I would like to provide a similar abstraction that https://github.com/sindresorhus/ky-universal uses for NodeJS and browser, utilizing the browser property in package.json.

AuHau avatar Sep 01 '21 13:09 AuHau

Seems reasonable to me. Go for it

mdlavin avatar Sep 28 '21 14:09 mdlavin