简体   繁体   中英

vue-cli3 syntax error in ie11 in prodcution

babel.config.js

module.exports = {
  presets: [
    [
      "@vue/app",
      {
        useBuiltIns: "entry",
      }
    ]
  ]
}

main.js

import '@babel/polyfill'

package.json

"browserslist": [
    "> 1%",
    "last 2 versions",
    "not ie <= 10"
  ],

above's config is my vue-cli3 project, the class was not be polyfill, why? 在此处输入图片说明

thirdpart lib

    "axios": "^0.18.0",
    "jsonp": "^0.2.1",
    "swiper": "^4.4.6",
    "video.js": "^7.4.1",
    "videojs": "^1.0.0",
    "vue": "^2.5.22",
    "vuex": "^3.0.1"

I solved it myself. It turned out to be a problem with swiper.js. but, I have add config to vue.config.js, it's not works.

transpileDependencies: [
    'swiper'
],

is a bug?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM