React-app在Internet Explorer 11中无法使用

问题描述 投票:0回答:1

我有一个React应用,需要在Internet Explorer 11中运行。我使用Material-UI和其他一些小型库。现在,我只能看到一个空白页。我尝试了下一个解决方案(没有成功):

  1. 我为ie11添加了react-app-polyfill作为index.js中的第一行:

    import 'react-app-polyfill/ie11';import 'react-app-polyfill/stable';

  2. 在我的package.json中,我添加了Internet Explorer 11:

        "production": [
          ">0.2%",
          "not dead",
          "not op_mini all",
          "ie 11"
        ],
        "development": [
          ">0.2%",
          "not dead",
          "not op_mini all",
          "ie 11"
        ]
      }```
    

还有下一个错误(由西班牙语翻译:

在严格模式下,不允许从函数或对象访问属性“调用者”。

对象不接受属性或函数“重复”

[对这个话题有更多了解的人可以帮助我吗?谢谢!

reactjs internet-explorer material-ui internet-explorer-11
1个回答
0
投票

我使用react-easy-state来管理应用程序的全局状态。如文档所述,它与Internet Explorer不兼容。我删除了该库,它正常工作。

© www.soinside.com 2019 - 2024. All rights reserved.