生产中的ie11中的vue-cli 3语法错误

问题描述 投票:1回答:1

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"
  ],

上面的配置是我的vue-cli3项目,class不是polyfill,为什么? enter image description here

第三部分

    "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"
vue.js vue-cli-3
1个回答
1
投票

我自己解决了。原来这是swiper.js的一个问题。但是,我已经将配置添加到vue.config.js,它不起作用。

transpileDependencies: [
    'swiper'
],

是个bug?

© www.soinside.com 2019 - 2024. All rights reserved.