我该如何解决SCRIPT1003?

时间:2019-11-21 13:43:38

标签: vue.js internet-explorer webpack babel

关于此问题也有类似的问题,但似乎没有一个能真正解决问题。

使用VueJS开发了一个项目,该项目使用ES6语法构建并使用BabeJS进行了转译,然后与Webpack捆绑在一起。

这里有一些规格,

依赖项:

"dependencies": {
        "@babel/core": "^7.6.2",
        "@babel/plugin-proposal-class-properties": "^7.5.0",
        "@babel/plugin-transform-modules-commonjs": "^7.5.0",
        "@babel/plugin-transform-shorthand-properties": "^7.2.0",
        "@babel/plugin-transform-runtime": "^7.6.2",
        "@babel/preset-env": "^7.6.2",
        "@babel/runtime": "^7.6.2",
        "@vue/test-utils": "^1.0.0-beta.29",
        "autoprefixer": "^9.6.1",
        "babel-eslint": "^10.0.1",
        "babel-jest": "^24.8.0",
        "babel-loader": "^8.0.6",
        "babel-plugin-istanbul": "^5.1.0",
        "babel-template": "^6.26.0",
        "chalk": "^2.4.2",
        "compression-webpack-plugin": "^3.0.0",
        "copy-webpack-plugin": "^5.0.3",
        "css-loader": "^2.1.0",
        "eslint": "^6.5.1",
        "eslint-friendly-formatter": "^4.0.1",
        "eslint-loader": "^2.2.1",
        "eslint-plugin-vue": "^5.1.0",
        "friendly-errors-webpack-plugin": "^1.7.0",
        "html-webpack-plugin": "^3.2.0",
        "jest": "^24.8.0",
        "jest-serializer-vue": "^2.0.2",
        "js-yaml": "^3.12.1",
        "jsdom": "^13.2.0",
        "lint-staged": "^9.4.1",
        "mini-css-extract-plugin": "^0.7.0",
        "node-env-tools": "^1.0.2",
        "node-sass": "^4.12.0",
        "optimize-css-assets-webpack-plugin": "^5.0.3",
        "ora": "^3.4.0",
        "portfinder": "^1.0.20",
        "postcss": "^7.0.17",
        "postcss-assets": "^5.0.0",
        "postcss-import": "^12.0.1",
        "postcss-loader": "^3.0.0",
        "postcss-url": "^8.0.0",
        "prettier": "^1.16.4",
        "pug": "^2.0.4",
        "pug-plain-loader": "^1.0.0",
        "rimraf": "^2.6.3",
        "sass-lint": "^1.12.1",
        "sass-loader": "^7.1.0",
        "semver": "^5.6.0",
        "style-loader": "^0.23.1",
        "terser-webpack-plugin": "^1.3.0",
        "text-table": "^0.2.0",
        "url-loader": "^2.0.1",
        "vue": "^2.6.10",
        "vue-eslint-parser": "^6.0.4",
        "vue-jest": "^3.0.4",
        "vue-loader": "^15.7.0",
        "vue-prop-sep": "^1.0.2",
        "vue-router": "^3.0.2",
        "vue-server-renderer": "^2.6.10",
        "vue-style-loader": "^4.1.2",
        "vue-template-compiler": "^2.6.10",
        "vue-template-es2015-compiler": "^1.9.1",
        "webpack": "^4.41.0",
        "webpack-bundle-analyzer": "^3.5.1",
        "webpack-cli": "^3.3.5",
        "webpack-dev-server": "^3.7.2",
        "webpack-merge": "^4.2.1"
    }

babelrc:

{
    "env": {
        "test": {
            "plugins": [
                "istanbul"
            ]
        }
    },
    "presets": [
        [
            "@babel/preset-env",
            {
                "debug": true,
                "modules": false,
                "targets": {
                    "browsers": ["> 1%", "last 2 versions", "not ie <= 10"]
                }
            }
        ]
    ],
    "plugins": [
        "@babel/plugin-proposal-class-properties",
        "@babel/plugin-transform-modules-commonjs",
        "@babel/plugin-transform-shorthand-properties",
        "@babel/plugin-transform-runtime"
    ]
}

预设调试跟踪:

Using targets:
{
  "android": "76",
  "chrome": "76",
  "edge": "17",
  "firefox": "68",
  "ie": "10",
  "ios": "12.2",
  "opera": "12.1",
  "safari": "12.1",
  "samsung": "9.2"
}

Using modules transform: false

Using plugins:
  transform-template-literals { "android":"76", "ie":"10", "ios":"12.2", "opera":"12.1", "safari":"12.1" }
  transform-literals { "android":"76", "ie":"10", "opera":"12.1" }
  transform-function-name { "android":"76", "edge":"17", "ie":"10", "opera":"12.1" }
  transform-arrow-functions { "android":"76", "ie":"10", "opera":"12.1" }
  transform-block-scoped-functions { "android":"76", "ie":"10", "opera":"12.1" }
  transform-classes { "android":"76", "ie":"10", "opera":"12.1" }
  transform-object-super { "android":"76", "ie":"10", "opera":"12.1" }
  transform-shorthand-properties { "android":"76", "ie":"10", "opera":"12.1" }
  transform-duplicate-keys { "android":"76", "ie":"10", "opera":"12.1" }
  transform-computed-properties { "android":"76", "ie":"10", "opera":"12.1" }
  transform-for-of { "android":"76", "ie":"10", "opera":"12.1" }
  transform-sticky-regex { "android":"76", "ie":"10", "opera":"12.1" }
  transform-dotall-regex { "android":"76", "edge":"17", "firefox":"68", "ie":"10", "opera":"12.1" }
  transform-unicode-regex { "android":"76", "ie":"10", "opera":"12.1" }
  transform-spread { "android":"76", "ie":"10", "opera":"12.1" }
  transform-parameters { "android":"76", "edge":"17", "ie":"10", "opera":"12.1" }
  transform-destructuring { "android":"76", "ie":"10", "opera":"12.1" }
  transform-block-scoping { "android":"76", "ie":"10", "opera":"12.1" }
  transform-typeof-symbol { "android":"76", "ie":"10", "opera":"12.1" }
  transform-new-target { "android":"76", "ie":"10", "opera":"12.1" }
  transform-regenerator { "android":"76", "ie":"10", "opera":"12.1" }
  transform-exponentiation-operator { "android":"76", "ie":"10", "opera":"12.1" }
  proposal-async-generator-functions { "android":"76", "edge":"17", "ie":"10", "opera":"12.1" }
  proposal-object-rest-spread { "android":"76", "edge":"17", "ie":"10", "opera":"12.1" }
  proposal-unicode-property-regex { "android":"76", "edge":"17", "firefox":"68", "ie":"10", "opera":"12.1", "samsung":"9.2" }
  proposal-json-strings { "android":"76", "edge":"17", "ie":"10", "opera":"12.1", "samsung":"9.2" }
  proposal-optional-catch-binding { "android":"76", "edge":"17", "ie":"10", "opera":"12.1", "samsung":"9.2" }
  transform-named-capturing-groups-regex { "android":"76", "edge":"17", "firefox":"68", "ie":"10", "opera":"12.1", "samsung":"9.2" }
  syntax-dynamic-import { "android":"76", "chrome":"76", "edge":"17", "firefox":"68", "ie":"10", "ios":"12.2", "opera":"12.1", "safari":"12.1", "samsung":"9.2" }

Using polyfills: No polyfills were added, since the `useBuiltIns` option was not set.

https://browserl.ist/?q=%3E+1%25%2C+last+2+versions%2C+not+ie+%3C%3D+10处测试浏览器配置,应该可以在IE11上使用,但不能。

此外,bootstrap-vue用于项目中。

IMO,看来Babel完全在使用正确的browserlist配置,在某些时候未正确使用它,也许webpack覆盖了该配置。

??有什么建议吗? 预先感谢

更新

我更改了@ babel / preset-env配置并添加了core-js

调试跟踪输出如下:

Using targets:
{
  "android": "76",
  "chrome": "76",
  "edge": "17",
  "firefox": "68",
  "ie": "10",
  "ios": "12.2",
  "opera": "12.1",
  "safari": "12.1",
  "samsung": "9.2"
}

Using modules transform: auto

Using plugins:
  transform-template-literals { "android":"76", "ie":"10", "ios":"12.2", "opera":"12.1", "safari":"12.1" }
  transform-literals { "android":"76", "ie":"10", "opera":"12.1" }
  transform-function-name { "android":"76", "edge":"17", "ie":"10", "opera":"12.1" }
  transform-arrow-functions { "android":"76", "ie":"10", "opera":"12.1" }
  transform-block-scoped-functions { "android":"76", "ie":"10", "opera":"12.1" }
  transform-classes { "android":"76", "ie":"10", "opera":"12.1" }
  transform-object-super { "android":"76", "ie":"10", "opera":"12.1" }
  transform-shorthand-properties { "android":"76", "ie":"10", "opera":"12.1" }
  transform-duplicate-keys { "android":"76", "ie":"10", "opera":"12.1" }
  transform-computed-properties { "android":"76", "ie":"10", "opera":"12.1" }
  transform-for-of { "android":"76", "ie":"10", "opera":"12.1" }
  transform-sticky-regex { "android":"76", "ie":"10", "opera":"12.1" }
  transform-dotall-regex { "android":"76", "edge":"17", "firefox":"68", "ie":"10", "opera":"12.1" }
  transform-unicode-regex { "android":"76", "ie":"10", "opera":"12.1" }
  transform-spread { "android":"76", "ie":"10", "opera":"12.1" }
  transform-parameters { "android":"76", "edge":"17", "ie":"10", "opera":"12.1" }
  transform-destructuring { "android":"76", "ie":"10", "opera":"12.1" }
  transform-block-scoping { "android":"76", "ie":"10", "opera":"12.1" }
  transform-typeof-symbol { "android":"76", "ie":"10", "opera":"12.1" }
  transform-new-target { "android":"76", "ie":"10", "opera":"12.1" }
  transform-regenerator { "android":"76", "ie":"10", "opera":"12.1" }
  transform-exponentiation-operator { "android":"76", "ie":"10", "opera":"12.1" }
  proposal-async-generator-functions { "android":"76", "edge":"17", "ie":"10", "opera":"12.1" }
  proposal-object-rest-spread { "android":"76", "edge":"17", "ie":"10", "opera":"12.1" }
  proposal-unicode-property-regex { "android":"76", "edge":"17", "firefox":"68", "ie":"10", "opera":"12.1", "samsung":"9.2" }
  proposal-json-strings { "android":"76", "edge":"17", "ie":"10", "opera":"12.1", "samsung":"9.2" }
  proposal-optional-catch-binding { "android":"76", "edge":"17", "ie":"10", "opera":"12.1", "samsung":"9.2" }
  transform-named-capturing-groups-regex { "android":"76", "edge":"17", "firefox":"68", "ie":"10", "opera":"12.1", "samsung":"9.2" }
  syntax-dynamic-import { "android":"76", "chrome":"76", "edge":"17", "firefox":"68", "ie":"10", "ios":"12.2", "opera":"12.1", "safari":"12.1", "samsung":"9.2" }

Using polyfills with `usage` option:

  When setting `useBuiltIns: 'usage'`, polyfills are automatically imported when needed.
  Please remove the direct import of `core-js` or use `useBuiltIns: 'entry'` instead.

[/home/arturom/Projects/com.gitlab/eurobits/cobranding/webportal-2.0/src/index.js] Based on your code and targets, core-js polyfills were not added.
12% building 19/25 modules 6 active /home/arturom/Projects/com.gitlab/eurobits/cobranding/webportal-2.0/node_modules/html-entities/index.js
[/home/arturom/Projects/com.gitlab/eurobits/cobranding/webportal-2.0/src/router.js] Based on your code and targets, core-js polyfills were not added.
12% building 21/27 modules 6 active /home/arturom/Projects/com.gitlab/eurobits/cobranding/webportal-2.0/node_modules/loglevel/lib/loglevel.js
[/home/arturom/Projects/com.gitlab/eurobits/cobranding/webportal-2.0/src/plugins/env-config.js] Based on your code and targets, core-js polyfills were not added.
40% building 223/249 modules 26 active /home/arturom/Projects/com.gitlab/eurobits/cobranding/webportal-2.0/node_modules/bootstrap-vue/esm/components/toast/toaster.js
[/home/arturom/Projects/com.gitlab/eurobits/cobranding/webportal-2.0/src/views/product-selection/script.js] Added following core-js polyfills:
  es.array.find { "android":"76", "ie":"10", "opera":"12.1" }
  es.array.includes { "android":"76", "ie":"10", "opera":"12.1" }
  es.object.to-string { "android":"76", "ie":"10", "opera":"12.1" }
  es.promise { "android":"76", "edge":"17", "firefox":"68", "ie":"10", "opera":"12.1" }
  es.string.includes { "android":"76", "edge":"17", "ie":"10", "opera":"12.1" }

[/home/arturom/Projects/com.gitlab/eurobits/cobranding/webportal-2.0/src/views/product-selection/script.js] Based on your code and targets, added regenerator-runtime.
40% building 224/249 modules 25 active /home/arturom/Projects/com.gitlab/eurobits/cobranding/webportal-2.0/node_modules/bootstrap-vue/esm/components/toast/toaster.js
[/home/arturom/Projects/com.gitlab/eurobits/cobranding/webportal-2.0/src/app/script.js] Based on your code and targets, core-js polyfills were not added.
40% building 225/249 modules 24 active /home/arturom/Projects/com.gitlab/eurobits/cobranding/webportal-2.0/node_modules/bootstrap-vue/esm/components/toast/toaster.js
[/home/arturom/Projects/com.gitlab/eurobits/cobranding/webportal-2.0/src/views/product-confirmation/script.js] Based on your code and targets, core-js polyfills were not added.
40% building 226/249 modules 23 active /home/arturom/Projects/com.gitlab/eurobits/cobranding/webportal-2.0/node_modules/bootstrap-vue/esm/components/toast/toaster.js
[/home/arturom/Projects/com.gitlab/eurobits/cobranding/webportal-2.0/src/views/sms-confirmation/script.js] Based on your code and targets, core-js polyfills were not added.
40% building 227/249 modules 22 active /home/arturom/Projects/com.gitlab/eurobits/cobranding/webportal-2.0/node_modules/bootstrap-vue/esm/components/toast/toaster.js
[/home/arturom/Projects/com.gitlab/eurobits/cobranding/webportal-2.0/src/views/home/script.js] Based on your code and targets, core-js polyfills were not added.
40% building 228/249 modules 21 active /home/arturom/Projects/com.gitlab/eurobits/cobranding/webportal-2.0/node_modules/bootstrap-vue/esm/components/toast/toaster.js
[/home/arturom/Projects/com.gitlab/eurobits/cobranding/webportal-2.0/src/views/process-check/script.js] Added following core-js polyfills:
  es.array.concat { "android":"76", "ie":"10", "opera":"12.1" }
  es.array.includes { "android":"76", "ie":"10", "opera":"12.1" }
  es.array.some { "opera":"12.1" }
  es.object.keys { "android":"76", "ie":"10", "opera":"12.1" }
  es.object.to-string { "android":"76", "ie":"10", "opera":"12.1" }
  es.promise { "android":"76", "edge":"17", "firefox":"68", "ie":"10", "opera":"12.1" }
  es.regexp.exec { "opera":"12.1" }
  es.string.includes { "android":"76", "edge":"17", "ie":"10", "opera":"12.1" }
  es.string.replace { "android":"76", "edge":"17", "firefox":"68", "ie":"10", "ios":"12.2", "opera":"12.1", "safari":"12.1" }
  es.string.split { "android":"76", "edge":"17", "ie":"10", "opera":"12.1" }

[/home/arturom/Projects/com.gitlab/eurobits/cobranding/webportal-2.0/src/views/process-check/script.js] Based on your code and targets, added regenerator-runtime.
40% building 229/249 modules 20 active /home/arturom/Projects/com.gitlab/eurobits/cobranding/webportal-2.0/node_modules/bootstrap-vue/esm/components/toast/toaster.js
[/home/arturom/Projects/com.gitlab/eurobits/cobranding/webportal-2.0/src/views/entities/script.js] Added following core-js polyfills:
  es.object.to-string { "android":"76", "ie":"10", "opera":"12.1" }
  es.promise { "android":"76", "edge":"17", "firefox":"68", "ie":"10", "opera":"12.1" }

[/home/arturom/Projects/com.gitlab/eurobits/cobranding/webportal-2.0/src/views/entities/script.js] Based on your code and targets, added regenerator-runtime.
40% building 237/252 modules 15 active /home/arturom/Projects/com.gitlab/eurobits/cobranding/webportal-2.0/node_modules/vue-functional-data-merge/dist/lib.esm.js
[/home/arturom/Projects/com.gitlab/eurobits/cobranding/webportal-2.0/src/views/entity-login/script.js] Added following core-js polyfills:
  es.array.concat { "android":"76", "ie":"10", "opera":"12.1" }
  es.array.for-each { "opera":"12.1" }
  es.array.includes { "android":"76", "ie":"10", "opera":"12.1" }
  es.array.join { "ie":"10", "opera":"12.1" }
  es.array.last-index-of { "android":"76", "opera":"12.1" }
  es.array.map { "android":"76", "ie":"10", "opera":"12.1" }
  es.array.some { "opera":"12.1" }
  es.date.to-string { "opera":"12.1" }
  es.function.name { "ie":"10", "opera":"12.1" }
  es.object.assign { "android":"76", "ie":"10", "opera":"12.1" }
  es.object.keys { "android":"76", "ie":"10", "opera":"12.1" }
  es.object.to-string { "android":"76", "ie":"10", "opera":"12.1" }
  es.promise { "android":"76", "edge":"17", "firefox":"68", "ie":"10", "opera":"12.1" }
  es.regexp.exec { "opera":"12.1" }
  es.regexp.to-string { "android":"76", "edge":"17", "ie":"10", "opera":"12.1" }
  es.string.includes { "android":"76", "edge":"17", "ie":"10", "opera":"12.1" }
  es.string.replace { "android":"76", "edge":"17", "firefox":"68", "ie":"10", "ios":"12.2", "opera":"12.1", "safari":"12.1" }
  web.dom-collections.for-each { "android":"76", "ie":"10", "opera":"12.1" }

[/home/arturom/Projects/com.gitlab/eurobits/cobranding/webportal-2.0/src/views/entity-login/script.js] Based on your code and targets, added regenerator-runtime.
46% building 303/321 modules 18 active /home/arturom/Projects/com.gitlab/eurobits/cobranding/webportal-2.0/node_modules/bootstrap-vue/esm/components/tooltip/helpers/bv-popper.js
[/home/arturom/Projects/com.gitlab/eurobits/cobranding/webportal-2.0/src/mixins/robots.js] Added following core-js polyfills:
  es.array.filter { "android":"76", "ie":"10", "opera":"12.1" }
  es.array.find { "android":"76", "ie":"10", "opera":"12.1" }
  es.array.includes { "android":"76", "ie":"10", "opera":"12.1" }
  es.array.index-of { "android":"76", "opera":"12.1" }
  es.array.sort { "android":"76", "opera":"12.1" }
  es.function.name { "ie":"10", "opera":"12.1" }
  es.object.to-string { "android":"76", "ie":"10", "opera":"12.1" }
  es.promise { "android":"76", "edge":"17", "firefox":"68", "ie":"10", "opera":"12.1" }
  es.string.includes { "android":"76", "edge":"17", "ie":"10", "opera":"12.1" }

[/home/arturom/Projects/com.gitlab/eurobits/cobranding/webportal-2.0/src/mixins/robots.js] Based on your code and targets, added regenerator-runtime.
46% building 304/321 modules 17 active /home/arturom/Projects/com.gitlab/eurobits/cobranding/webportal-2.0/node_modules/bootstrap-vue/esm/components/tooltip/helpers/bv-popper.js
[/home/arturom/Projects/com.gitlab/eurobits/cobranding/webportal-2.0/src/mixins/is-error.js] Added following core-js polyfill:
  es.array.concat { "android":"76", "ie":"10", "opera":"12.1" }
46% building 305/321 modules 16 active /home/arturom/Projects/com.gitlab/eurobits/cobranding/webportal-2.0/node_modules/bootstrap-vue/esm/components/tooltip/helpers/bv-popper.js
[/home/arturom/Projects/com.gitlab/eurobits/cobranding/webportal-2.0/src/mixins/eur-codes.js] Added following core-js polyfills:
  es.object.to-string { "android":"76", "ie":"10", "opera":"12.1" }
  es.promise { "android":"76", "edge":"17", "firefox":"68", "ie":"10", "opera":"12.1" }
  es.regexp.exec { "opera":"12.1" }
  es.string.match { "android":"76", "edge":"17", "ie":"10", "opera":"12.1" }

[/home/arturom/Projects/com.gitlab/eurobits/cobranding/webportal-2.0/src/mixins/eur-codes.js] Based on your code and targets, added regenerator-runtime.
46% building 307/334 modules 27 active /home/arturom/Projects/com.gitlab/eurobits/cobranding/webportal-2.0/node_modules/core-js/modules/es.regexp.to-string.js
[/home/arturom/Projects/com.gitlab/eurobits/cobranding/webportal-2.0/src/mixins/delayed-request.js] Added following core-js polyfills:
  es.object.to-string { "android":"76", "ie":"10", "opera":"12.1" }
  es.promise { "android":"76", "edge":"17", "firefox":"68", "ie":"10", "opera":"12.1" }

[/home/arturom/Projects/com.gitlab/eurobits/cobranding/webportal-2.0/src/mixins/delayed-request.js] Based on your code and targets, added regenerator-runtime.
63% building 451/503 modules 52 active /home/arturom/Projects/com.gitlab/eurobits/cobranding/webportal-2.0/node_modules/core-js/internals/array-species-create.js
[/home/arturom/Projects/com.gitlab/eurobits/cobranding/webportal-2.0/src/components/accounts-list/script.js] Based on your code and targets, core-js polyfills were not added.
64% building 453/503 modules 50 active /home/arturom/Projects/com.gitlab/eurobits/cobranding/webportal-2.0/node_modules/core-js/internals/array-species-create.js
[/home/arturom/Projects/com.gitlab/eurobits/cobranding/webportal-2.0/src/components/app-footer/script.js] Based on your code and targets, core-js polyfills were not added.
64% building 455/503 modules 48 active /home/arturom/Projects/com.gitlab/eurobits/cobranding/webportal-2.0/node_modules/core-js/internals/array-species-create.js
[/home/arturom/Projects/com.gitlab/eurobits/cobranding/webportal-2.0/src/components/app-header/script.js] Based on your code and targets, core-js polyfills were not added.
64% building 456/503 modules 47 active /home/arturom/Projects/com.gitlab/eurobits/cobranding/webportal-2.0/node_modules/core-js/internals/array-species-create.js
[/home/arturom/Projects/com.gitlab/eurobits/cobranding/webportal-2.0/src/components/entity-logo/script.js] Based on your code and targets, core-js polyfills were not added.
64% building 457/503 modules 46 active /home/arturom/Projects/com.gitlab/eurobits/cobranding/webportal-2.0/node_modules/core-js/internals/array-species-create.js
[/home/arturom/Projects/com.gitlab/eurobits/cobranding/webportal-2.0/src/components/account-detail/script.js] Based on your code and targets, core-js polyfills were not added.
67% building 523/544 modules 21 active /home/arturom/Projects/com.gitlab/eurobits/cobranding/webportal-2.0/node_modules/core-js/internals/create-property-descriptor.js
[/home/arturom/Projects/com.gitlab/eurobits/cobranding/webportal-2.0/src/mixins/app-close.js] Added following core-js polyfills:
  es.array.concat { "android":"76", "ie":"10", "opera":"12.1" }
  es.array.join { "ie":"10", "opera":"12.1" }
  es.array.map { "android":"76", "ie":"10", "opera":"12.1" }
  es.object.keys { "android":"76", "ie":"10", "opera":"12.1" }
  es.regexp.exec { "opera":"12.1" }
  es.string.replace { "android":"76", "edge":"17", "firefox":"68", "ie":"10", "ios":"12.2", "opera":"12.1", "safari":"12.1" }
68% building 551/567 modules 16 active ...its/cobranding/webportal-2.0/node_modules/sass-loader/dist/cjs.js??ref--4-3!/home/arturom/Projects/com.gitlab/eurobits/cobranding/webportal-2.0/src/components/accounts-list-item/style.sass?vue&type=style&index=0&lang=sass&
[/home/arturom/Projects/com.gitlab/eurobits/cobranding/webportal-2.0/src/components/accounts-list-item/script.js] Added following core-js polyfill:
  es.number.constructor { "android":"76", "ie":"10", "opera":"12.1" }
98% after emitting CopyPlugin

更新(2019-11-26)

这是我现在的.babelrc配置:

{
    "presets": [
        [
            "@babel/preset-env",
            {
                "debug": true,
                "modules": false,
                "useBuiltIns": "entry",
                "corejs": 3,
                "targets": {
                    "browsers": "> 1%, last 2 versions, not ie <= 10"
                }
            }
        ]
    ]
}

我已经将core-js@babel/polyfill都添加到devDependencies中。另外,我已将@babel/polyfill添加到我的入口点文件中。 IE11中仍然存在 SCRIPT1003 错误。

0 个答案:

没有答案