vue+element-ui|vue+element-ui build 出现 UglifyJs Unexpected token: punc 问题

1、报错:
ERROR in static/js/vendor.b42509bed96843193b81.js from UglifyJs
Unexpected token: punc ()) [./~/_element-ui@2.0.11@element-ui/src/utils/resize-event.js:73,0][static/js/vendor.b42509bed96843193b81.js:154155,37]
2、解决方案:
build/webpack.base.conf.js 文件中的loader:'babel-loader'那块 添加resolve('/node_modules/_element-ui@2.0.11@element-ui/src/utils/resize-event.js')如下内容:
也可添加resolve('/node_modules/_element-ui') ---可不受版本号影响
rules: [
{
test:/\.vue$/,
loader:'vue-loader',
options:vueLoaderConfig
【vue+element-ui|vue+element-ui build 出现 UglifyJs Unexpected token: punc 问题】},
{
test:/\.js$/,
loader:'babel-loader',
include: [resolve('src'), resolve('test'),resolve('/node_modules/_element-ui')]
},

    推荐阅读