VUE-cli 兼容 IE
main.js
import 'babel-polyfill'
//
webpack.base.conf.js
//
webpack.base.conf.js
entry: {
app: ["babel-polyfill", "./src/main.js"]
},
&&
光加上 ["babel-polyfill", "./src/main.js"] 还是不够的,需要在rules的 include 里面都添加一遍
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')
]
}
]
}