nuxt / http

Universal HTTP Module for Nuxt.js
https://http.nuxtjs.org
MIT License
229 stars 51 forks source link

Not compatible with IE 11 #126

Open danielroe opened 4 years ago

danielroe commented 4 years ago

Version

v0.5.11

Reproduction link

https://github.com/danielroe/nuxt-ie-http

See also browser support statement in ky README

Steps to reproduce

Although Nuxt polyfills unfetch in IE, ky uses an implementation of the header class that isn't compatible with IE 11.

Probably worth mentioning in the docs.

What is expected ?

IE11 support or a mention in the docs

What is actually happening?

No mention

pi0 commented 4 years ago

We do transpile ky (src). Can you please share some more info about error?

danielroe commented 4 years ago

Sure. I'll prepare a reproduction. It's worth noting that the error only shows up in production - not in dev.

danielroe commented 4 years ago

https://github.com/danielroe/nuxt-ie-http

Just build/start and view in IE.

Error screenshot: Screenshot from 2020-08-28 11-51-51

danielroe commented 4 years ago

I have written an almost-drop-in replacement for ky + this module that does work in IE. As I recall the issue was ky's implementation of the Headers class. I'm not suggesting changing @nuxt/http but it is worth noting in the docs.

pi0 commented 4 years ago

Using ky is a little bit disappointing indeed... We may replace in next major version. Would you mind opening docs PR for notice? Later-one can check IE issue on VM and possible fix

jloewe commented 4 years ago

Unfortunately this is a game breaker for me and I will have to switch back to axios now :/

@pi0 do you have a specific library in mind for the next mayor version?

pi0 commented 4 years ago

@jloewe Most likely building on top of native fetch or an in-house (nuxt-contrib) project for universally using.

danielroe commented 4 years ago

@pi0 would you like a PR to refactor this module not to use ky?

atinux commented 3 years ago

I vote 👍 to remove ky here and only depend on fetch. I let @pi0 confirm, thank you for your help @danielroe 💚

ricardogobbosouza commented 3 years ago

Hi @Atinux, @pi0 Can I refactor this module to use https://github.com/nuxt-contrib/ohmyfetch ?

pi0 commented 3 years ago

https://github.com/nuxt/http/issues/141#issuecomment-787953592