vue打包出现错误

问题描述

vue打包的时候遇到错误

问题出现的环境背景及自己尝试过哪些方法

vue打包遇到

相关代码

// 请把代码文本粘贴到下方(请勿用图片代替代码)

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:

你期待的结果是什么?实际看到的错误信息又是什么?

https://img.mukewang.com/5b82b24700019e6d08000211.jpg

慕丝7291255
浏览 3710回答 2
2回答

POPMUISE

删了modules重装一下

饮歌长啸

UglifyJs不支持ES6,有可能是ES6的代码没有Babel就扔给UglifyJs了
打开App,查看更多内容
随时随地看视频慕课网APP

相关分类

Vue.js