Fetch polyfill in React not completely working in IE 11

前端 未结 4 514
刺人心
刺人心 2021-01-07 02:53

This fetch works fine in Chrome:

fetch( this.props.url, {credentials:\'same-origin\'})
    .then( (data) => data.js         


        
4条回答
  •  孤独总比滥情好
    2021-01-07 03:43

    So here's what I ended up using that worked for me:

    require('es6-promise').polyfill();
    require('fetch-everywhere');
    

    I had tried two other fetches that were touted as being magical and polyfilling, but the combo above is what finally allowed me to get to the REST of the IE incompatibilities in my code. :)

提交回复
热议问题