在 IE 11 中运行 Angular 9 应用程序时出现 vendor.js 文件中的语法错误。我已启用所有 polyfill 并将 tsconfig.json 中的目标更改为“es5”。
任何帮助将不胜感激!
包.json
"@angular/core": "~9.0.5",
"@angular/platform-browser": "~9.0.5",
"@ng-idle/core": "^10.0.0-beta.1",
"@ng-idle/keepalive": "^10.0.0-beta.1",
"classlist.js": "1.1.20150312",
"core-js": "^3.8.2",
"zone.js": "^0.10.3"
"typescript": "~3.7.5"
tsconfig.json
{
"compileOnSave": false,
"compilerOptions": {
"baseUrl": "./",
"outDir": "./dist/out-tsc",
"sourceMap": true,
"declaration": false,
"module": "es2015",
"moduleResolution": "node",
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"target": "es5",
"typeRoots": ["node_modules/@types"],
"lib": ["es2015", "es5", "es6", "dom"]
}
}