React app not rendering in IE 11 even with polyfills

无人久伴 提交于 2021-02-11 06:13:34

问题


I have a fully built React application that I would like to deploy on IE 11, but been having no success but a white page.

For the sake of testing, I created a dummy app using npx create-react-app and attempted to launch on IE 11/Edge. Installing 'react-app-polyfill' and importing on 'react-app-polyfill/ie11' and 'react-app-polyfill/stable' on line 1 & 2 of index.js, I also included "last 1 ie version" in the browserlist.development inside the package.json file.

Every resource online points to react needing polyfill to be viewable on IE 11 but I haven't had any success. Any pointers greatly appreciated!


回答1:


What is your react-scripts version? The issue is most likely related to react-scripts version 3.3.0. You could find many issue reports in GitHub, for example: IE11 support doesn't work in dev mode, even after adding all polyfills and enabling ie11 support, Why application created using create-react-app is not working in IE browser?.

It can still work with react-scripts@3.2.0. You could try to revert back to 3.2.0 as a workaround. Please also remember to delete .cache folder in node_modules and delete IE browser cache then try again.



来源:https://stackoverflow.com/questions/60105826/react-app-not-rendering-in-ie-11-even-with-polyfills

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!