【发布时间】:2020-04-14 17:12:59
【问题描述】:
我有许多在 Internet Explorer 11 中运行的 React 应用程序(带有 polyfills)。我想在我的下一个应用程序中使用 TypeScript,所以我使用与其他应用程序相同的技术和概念开发了我的第一个应用程序。问题是我只能在该浏览器中看到一个空白页面,以及许多错误(翻译自西班牙语):
字符集中的范围无效。
对象不接受“重复”属性或方法(这个出现了 26 次)。
这是我的 package.json:
{
"name": "reportes",
"homepage": "http://localhost:8080/isset/view/funeraria/reportes",
"version": "0.1.0",
"private": true,
"dependencies": {
"@material-ui/core": "^4.9.8",
"@material-ui/icons": "^4.9.1",
"@material-ui/lab": "^4.0.0-alpha.47",
"@mdi/js": "^5.0.45",
"@mdi/react": "^1.4.0",
"@testing-library/jest-dom": "^4.2.4",
"@testing-library/react": "^9.3.2",
"@testing-library/user-event": "^7.1.2",
"@types/jest": "^24.0.0",
"@types/node": "^12.0.0",
"@types/react": "^16.9.0",
"@types/react-dom": "^16.9.0",
"@types/react-router-dom": "^5.1.3",
"axios": "^0.19.2",
"core-js": "^3.6.5",
"exceljs": "^3.8.2",
"file-saver": "^2.0.2",
"moment": "^2.24.0",
"react": "^16.13.1",
"react-app-polyfill": "^1.0.6",
"react-dom": "^16.13.1",
"react-router-dom": "^5.1.2",
"react-scripts": "3.4.1",
"react-select": "^3.1.0",
"react-to-print": "^2.6.3",
"typescript": "~3.7.2"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject"
},
"eslintConfig": {
"extends": "react-app"
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all",
"ie 11"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version",
"ie 11"
]
}
}
我的 index.tsx 中有这个导入:
import 'react-app-polyfill/ie9';
import 'react-app-polyfill/stable';
你能帮我解决这个问题吗?
【问题讨论】:
-
这是一个 exceljs 问题阅读此页面:github.com/exceljs/exceljs/issues/1177
标签: reactjs typescript internet-explorer internet-explorer-11