VUE-cli 兼容 IE

main.js

import 'babel-polyfill'
//
webpack.base.conf.js

entry: {
  app: ["babel-polyfill", "./src/main.js"]
},
&&

module:{
  rules: [
    {
      test: /\.js$/,
      loader: 'babel-loader',
      include: [
        resolve('src'),
        resolve('test'),
        resolve('node_modules/webpack-dev-server/client'),
        resolve('/node_modules/element-ui/src'),
        resolve('/node_modules/element-ui/pachages'),
        resolve('/node_modules/_element-ui@2.3.4@_element-ui/src'),
        resolve('/node_modules/_element-ui@2.3.4@_element-ui/pachages'),
        resolve('/node_modules/easyscroll/src'),
        resolve('/node_modules/_easyscroll@1.0.1@easyscroll/src')
      ]
    }
  ]
}
光加上  ["babel-polyfill", "./src/main.js"] 还是不够的,需要在rules的 include 里面都添加一遍
posted @ 2018-06-04 18:02  击鼓卖糖  阅读(806)  评论(0编辑  收藏  举报