The methods of IE 8 and IE 11 are similar

1, install,react-app-polyfillLibrary (Making the address)

yarn add react-app-polyfill
Copy the code

2. Add file import polyfill at the top of index.js

import "react-app-polyfill/ie11";
import "react-app-polyfill/stable";
Copy the code

3. Modify package.json

"Browserslist ": {"production": ["> production", "not dead", "not op_mini all"], "development": [ "last 1 chrome version", "last 1 firefox version", "last 1 safari version" ] },Copy the code

to

"Browserslist ": {"production": ["> production", "IE 11", "not dead", "not op_mini all"], "development": [ "last 1 chrome version", "last 1 firefox version", "last 1 safari version" ] },Copy the code

4. Repackage and release