The packaged code of vue-cli is still written in es6, and ie cannot be opened.

for example, after the project is packaged, the page cannot be opened in ie. After the uncompressed code is packaged, you can see that there is still let in the code. Why is babel not converted? no, no, no. The .babelrc code is as follows

{
  "presets": [
    ["env", {
      "modules": false,
      "targets": {
        "browsers": ["> 1%", "last 2 versions", "not ie <= 8"]
      }
    }],
    "stage-2",
    ["es2015"]
  ],
  "plugins": [
    "transform-vue-jsx",
    "transform-runtime",
    ["syntax-dynamic-import"],
    ["component", [
      {
        "libraryName": "element-ui",
        "styleLibraryName": "~theme"
      }
    ]]

  ],
  "env": {
    "test": {
      "presets": ["env", "stage-2"],
      "plugins": ["transform-vue-jsx", "transform-es2015-modules-commonjs", "dynamic-import-node"]
    }
  }
}
Feb.28,2021

if you read it correctly, you are configuring es6 . es2015 corresponds to es6 Oh


this is no problem,
clipboard.png

clipboard.png

in app.vue or other similar files, did you quote babel-polyfill ?


try adding transform-es2015-modules-umd to plugins.


have you solved it? Excuse me

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e8d1db-1132.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e8d1db-1132.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?