【发布时间】:2019-05-23 07:18:25
【问题描述】:
我的 Javascript 项目的一些 find 和 findIndex 方法在 IE 11 中不起作用。 这里是 package.json
{
"name": "form_builder_p1_old",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"build": "babel js -d lib"
},
"author": "",
"license": "ISC",
"devDependencies": {
"@babel/cli": "^7.4.4",
"@babel/core": "^7.4.5",
"@babel/plugin-transform-runtime": "^7.4.4",
"@babel/plugin-transform-spread": "^7.2.2",
"@babel/preset-env": "^7.4.5"
},
"dependencies": {
"@babel/polyfill": "^7.4.4",
"@babel/runtime": "^7.4.5",
"core-js": "^3.0.1",
"lodash": "^4.17.11",
"regenerator-runtime": "^0.13.2"
}
}
和.babelrc
{
"presets":[
[
"@babel/preset-env",
{
"useBuiltIns": "entry",
"corejs": "^3.0.1"
}
]
],
"plugins": ["@babel/plugin-transform-spread"]
}
Babel 在 IE 中运行良好。但是 find 方法不起作用。 我尝试过 polyfil 但没有成功, 这是我的项目目录。
请帮帮我。
谢谢
【问题讨论】:
标签: ecmascript-6 babeljs polyfills