当我们运行打包脚本npm run build或者打包iosweexpack build ios有可能会遇到以下报错 ERROR in index.js from UglifyJs ![](https://img2018.cnblogs.com/blog/1504257/201811/1504257-20181102141127347-447538002.png) 这是因为webpack在打包vue文件时没有成功转换ES6的语法 解决方法 解决方法很简单,加入babel-preset-es2015…
出现问题 使用vue+element-ui+webpack开发项目时,Jenkins构建出现报错error in static/js/xxx.js from UglifyJs Unpected token: punc() [static/js/xxx.js],本地打包出现报错SyntaxError: Unexpected token: name (xxxxxx) from Uglify plugin. 问题原因 打包时,部分代码没有从es6成功转化为es5,这部分代码经过查找,发现是由于elem…
What you did I have installed Swiper as normal dependency in my Project and import it to my scripts file like this import Swiper from 'swiper'; If I try to bundle it to a production ready version with webpack i get this error Unexpected token: name (…
使用weexpack构建weex应用时,npm run serve一直报这个错误 ERROR in index.web.js from UglifyJs Unexpected token: name (urlParts) [index.web.js:3754,4] ERROR in App.web.js from UglifyJs Unexpected token: name (urlParts) [App.web.js:3754,4] ERROR in page/web.web.js from…