vue/cli4

1.在项目中安装babel-polyfill,npm install --save babel-polyfill

2.在index.html里面加上:

3.在main.js里面加入 import '@babel/polyfill'

4.vue.config.js

 configureWebpack: config => {
    config.entry.app = ["babel-polyfill", "./src/main.js"];
 },
 transpileDependencies: ['swiper', 'dom7']  //如果用了swiper报错

© 黑发海贼 all right reserved,powered by Gitbook该文件修订时间: 2020-12-30 09:48:33

results matching ""

    No results matching ""