react16 IE兼容问题

import "babel-polyfill";
import React from 'react';
import ReactDOM from 'react-dom';
import Routes from './routes/routes';
import { Provider } from 'react-redux';
import { configureStore }  from "./redux/store/configureStore";
const store = configureStore()


ReactDOM.render(
    <Provider store={store}>
        <Routes/>
    </Provider>,
    document.getElementById('root')
)

package.json

{
  "name": "erp",
  "version": "0.1.0",
  "private": true,
  "homepage": "./",
  "dependencies": {
    "antd": "^3.10.4",
    "axios": "^0.18.0",
    "events": "^3.0.0",
    "jquery": "^3.3.1",
    "react": "^16.6.1",
    "react-cookies": "^0.1.0",
    "react-dom": "^16.6.1",
    "react-redux": "^5.1.1",
    "react-router-config": "^4.4.0-beta.6",
    "react-router-dom": "^4.3.1",
    "react-scripts": "2.1.1",
    "react-transition-group": "^2.5.0",
    "redux": "^4.0.1",
    "redux-thunk": "^2.3.0"
  },
  "scripts": {
    "start": "react-app-rewired start",
    "build": "react-app-rewired build",
    "test": "react-app-rewired test",
    "eject": "react-scripts eject"
  },
  "eslintConfig": {
    "extends": "react-app"
  },
  "browserslist": [
    ">0.2%",
    "not dead",
    "not ie <= 11",
    "not op_mini all"
  ],
  "devDependencies": {
    "babel-plugin-import": "^1.11.0",
    "babel-polyfill": "^6.26.0",
    "react-app-rewired": "^1.6.2",
    "redux-logger": "^3.0.6"
  }
}

入口文件顶部已经引入了babel-polyfill,Ie11下是正常的,在Ie10下为什么还问有Map未定义这种问题?而且Ie10及以下版本页面全部不能显示

阅读 4.9k
2 个回答

直接在html中引入es5-shim.js

将该js下载,放到项目的指定的目录下。

请问问题解决了吗?

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题