我正尝试在IE11上运行我的代码,但是遇到了箭头函数的问题。我无法弃用它们,并替换为function() {}
。
看起来它们已经从我的main.js
文件中删除了,但是在vendor.js
文件中,箭头函数仍然存在。我该如何去除它们?
我有一个浏览器列表,长这样:
> 0.5%
last 2 versions
Firefox ESR
not dead
IE 9-11
我还有一个看起来像这样的tsconfig.json
文件:
{
"compileOnSave": false,
"compilerOptions": {
"baseUrl": "./",
"downlevelIteration": true,
"importHelpers": true,
"outDir": "../path/to/folder",
"sourceMap": true,
"declaration": false,
"module": "esnext",
"moduleResolution": "node",
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"target": "es5",
"typeRoots": [
"node_modules/@types"
],
"lib": [
"es2017",
"dom"
]
}
}
lib
设置为"es5", "es6", "dom"
来查看是否有效。 - Yu Zhou