简体   繁体   English

生产中ie11中的vue-cli3语法错误

[英]vue-cli3 syntax error in ie11 in prodcution

babel.config.js babel.config.js

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

main.js主文件

import '@babel/polyfill'

package.json包.json

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

above's config is my vue-cli3 project, the class was not be polyfill, why?上面的配置是我的vue-cli3项目, class不是vue-cli3 ,为什么? 在此处输入图片说明

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.原来是swiper.js的问题。 but, I have add config to vue.config.js, it's not works.但是,我已经将配置添加到 vue.config.js,它不起作用。

transpileDependencies: [
    'swiper'
],

is a bug?是一个错误?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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