React JS not working with Internet Explorer 9

前端 未结 2 1008
一生所求
一生所求 2020-12-25 13:40

I\'m trying to use React with Internet Explorer 9 but getting the following errors even trying to run something very barebones:

SCRIPT438: Object doesn\'t suppor

2条回答
  •  粉色の甜心
    2020-12-25 14:05

    In index.js file you have to add polyfill. These imports should be in the first of your import.

    import 'react-app-polyfill/ie9';
    import 'react-app-polyfill/ie11';   
    //other imports
    

    Now open in ur ie it works.

    Before import you have to install react-app-polyfill.

     //To install use below command:
    
     npm install react-app-polyfill
    

    link reference: https://www.npmjs.com/package/react-app-polyfill

提交回复
热议问题