在线观看不卡亚洲电影_亚洲妓女99综合网_91青青青亚洲娱乐在线观看_日韩无码高清综合久久

鍍金池/ 問答/HTML/ vue打包出現(xiàn)錯(cuò)誤

vue打包出現(xiàn)錯(cuò)誤

問題描述

vue打包的時(shí)候遇到錯(cuò)誤

問題出現(xiàn)的環(huán)境背景及自己嘗試過哪些方法

vue打包遇到

相關(guān)代碼

// 請(qǐng)把代碼文本粘貼到下方(請(qǐng)勿用圖片代替代碼)

ERROR in static/js/app.381b5e966e947e42597a.js from UglifyJs
Unexpected token: punc (:) ./src/libs/util.js:4,15

Build failed with errors.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! bee@1.0.0 build: node build/build.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the bee@1.0.0 build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:

你期待的結(jié)果是什么?實(shí)際看到的錯(cuò)誤信息又是什么?

clipboard.png

回答
編輯回答
神經(jīng)質(zhì)

UglifyJs不支持ES6,有可能是ES6的代碼沒有Babel就扔給UglifyJs了

2017年7月17日 00:58
編輯回答
話寡

刪了modules重裝一下

2018年3月27日 21:14
編輯回答
殘淚

這個(gè)可能是這篇文章
提到的類似問題。
存在ES6代碼沒法解析,需要配置Babel先解析一遍

2017年8月15日 07:36