You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
i need to add these polyfills
import 'promise-polyfill/src/polyfill';
import 'unfetch/polyfill';
import 'abortcontroller-polyfill'
import 'url-search-params-polyfill';
Reacted by Alex Cory, Aksel Christoffer Wiig and Martin
@Fled8617 It sounds like you might be on a Microsoft computer since you're using IE. It's kind of a pain to test IE on mac. Would greatly appreciate if you could submit a PR!
This might be fixed as of #196
As soon as I get a windows machine I'll test this, but until then, anyone who has a windows machine who might be able to confirm that this works, please comment on here so I can close this.
I double checked, Object.entries is not polyfilled with the react-app-polyfill, nor in any of the other packages as far as I can tell. Not sure if this is helpful or not @alex-cory
@Akswii I'll make a branch, but could you pull down the branch and test it on your windows machine? Steps
git clone git@github.com:alex-cory/use-http.git
cd ./use-http
git checkout ie-support
yarn
yarn link
cd ..
create-react-app use-http-cra-app
cd ./use-http-cra-app
yarn
yarn link use-http
cd ../use-http
npm link ../use-http-cra-app/node_modules/react
npm link ../use-http-cra-app/node_modules/react-dom
cd ../use-http-cra-app
yarn start
Now just go into your use-http-cra-app/src/App.js and import use-http and test it in ie. I still need to make the ie-support branch so bare with me.
I had to do yarn build in use-http to make the test project work.
After adding the basic cra-app polyfill it seems like your ie-support fix branch is working. No need for me to polyfill anything extra. Tested in internet explorer 11. Nice! 🔥
I might just put this in the documentation. If you need ie11 support, use these polyfills. Or... maybe I just import them, and just have them as devDependencies, then will just use them at build time. 🤔 Thoughts?
Activity
fred8617 commentedon Sep 25, 2019
i need to add these polyfills
import 'promise-polyfill/src/polyfill';
import 'unfetch/polyfill';
import 'abortcontroller-polyfill'
import 'url-search-params-polyfill';
iamthesiz commentedon Sep 25, 2019
Will hop on this soon
iamthesiz commentedon Sep 27, 2019
@Fled8617 It sounds like you might be on a Microsoft computer since you're using IE. It's kind of a pain to test IE on mac. Would greatly appreciate if you could submit a PR!
iamthesiz commentedon Feb 26, 2020
I'm so excited I'm pretty sure I figured out a way to make this work.
iamthesiz commentedon Mar 6, 2020
This might be fixed as of #196
As soon as I get a windows machine I'll test this, but until then, anyone who has a windows machine who might be able to confirm that this works, please comment on here so I can close this.
Akswii commentedon Mar 8, 2020
It's not working for ie11 without the polyfills mentioned by @fred8617
iamthesiz commentedon Mar 9, 2020
Mind submitting a PR @Akswii? I removed the
Proxyso it shouldn't be too far off.Akswii commentedon Mar 9, 2020
Sorry, I don't have the time to look into it. Included the polyfills and got it working for my project. I appreciate your work @alex-cory 🙏
iamthesiz commentedon Mar 9, 2020
@Akswii so you didn't need to add a polyfill for
Object.entries?Akswii commentedon Mar 10, 2020
These are my current polyfills. I think a polyfill for
Object.entriesis included in one of the CRA polyfills.Akswii commentedon Mar 11, 2020
I double checked, Object.entries is not polyfilled with the
react-app-polyfill, nor in any of the other packages as far as I can tell. Not sure if this is helpful or not @alex-coryiamthesiz commentedon Mar 11, 2020
@Akswii I'll make a branch, but could you pull down the branch and test it on your windows machine? Steps
Now just go into your
use-http-cra-app/src/App.jsand importuse-httpand test it in ie. I still need to make theie-supportbranch so bare with me.Akswii commentedon Mar 11, 2020
I had to do
yarn buildinuse-httpto make the test project work.After adding the basic cra-app polyfill it seems like your ie-support fix branch is working. No need for me to polyfill anything extra. Tested in internet explorer 11. Nice! 🔥
iamthesiz commentedon Mar 12, 2020
I'm so excited
iamthesiz commentedon Mar 18, 2020
@Akswii when you say the basic cra-app polyfill, you are saying put these in the
useFetch.ts?I might just put this in the documentation. If you need ie11 support, use these polyfills. Or... maybe I just import them, and just have them as devDependencies, then will just use them at build time. 🤔 Thoughts?
Akswii commentedon Mar 19, 2020
@alex-cory correct. Yes you can do that / just have a link or reference to the react docs as they cover this if you want to be ie11 compatible.
Akswii commentedon Mar 19, 2020
If people are going to start testing their react app on explorer then it will crash because of react issues before it reaches your fetch library.
[-]don support ie11[/-][+]doesn't support ie11[/+]iamthesiz commentedon Mar 19, 2020
So anyone trying to get this to work in IE, just add these lines to the top of your main/root
App.jsfile.