修改build/webpack.base.conf.js文件
修改前
修改后
代码
module: { rules: [ { test: /.js$/, loader: 'babel-loader',//注意elementUI的源码使用ES6需要解析 include: [resolve('src'), resolve('test'),resolve('/node_modules/element-ui/src'),resolve('/node_modules/element-ui/packages')] } ] }