ERROR in index.web.js from UglifyJs
使用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 UglifyJs
Unexpected token: name (urlParts)
UglifyJs报错解决方案:
在 webpack.config.js 的同目录下创建文件 .babelrc,内容如下
{ "presets": ["es2015"] }
如果上面的方法也不行,那就不使用UglifyJs,全局搜索 new webpack.optimize.UglifyJsPlugin({minimize: true}),注释掉这一行就好了。
// web need vue-loader
const plugins = [
// new webpack.optimize.UglifyJsPlugin({minimize: true}), //这行不要
new webpack.BannerPlugin({
banner: '// { "framework": ' + (fileType === '.vue' ? '"Vue"' : '"Weex"') + '} \n',
raw: true,
exclude: 'Vue'
})
];
如果这样还是不行,你就得把你的package.json中的命令修改一下
"serve": "webpack-dev-server --config webpack.dev.js -p --open" -> "serve": "webpack-dev-server --config webpack.dev.js --open"
@落雨
http://js-dev.cn
ERROR in index.web.js from UglifyJs的更多相关文章
- 用weex create 创建app项目 报 ERROR in index.web.js from UglifyJs 错误!
用weex create创建一个APP项目,安装依赖后运行报 这个是package.json index.web.js 在dist目录下是build时生成的. 上面的答案没有给大家细节,不好意思致歉下 ...
- git报错 error: cannot stat ‘'web/js': Permission denied
切换分支时报错: error: cannot stat ‘'web/js': Permission denied 解决方法:退出编辑器.浏览器.资源管理器等,然后再切换就可以了.
- 使用iview-project 打包build报错,ERROR in xxxxx.cheunk.js from UglifyJs
一.iview-project 为iview官方推荐工程,一个基于iview的vue脚手架 github网址:https://github.com/iview/iview-project 废话不多说 ...
- 【解决】ERROR in xxx.js from UglifyJs
当我们运行打包脚本npm run build或者打包iosweexpack build ios有可能会遇到以下报错 ERROR in index.js from UglifyJs 
What you did I have installed Swiper as normal dependency in my Project and import it to my scripts ...
- error in static/js/xxx.js from UglifyJs Unpected token: punc() [static/js/xxx.js]
出现问题 使用vue+element-ui+webpack开发项目时,Jenkins构建出现报错error in static/js/xxx.js from UglifyJs Unpected tok ...
- 启动webpack-dev-server错误,ERROR in main.js from UglifyJs Unexpected token: name «element», expected: punc «;»
启动webpack-dev-server出现以下错误 ERROR in main.js from UglifyJsUnexpected token: name «element», expected: ...
- android ReactNative之Cannot find entry file index.android.js in any of the roots
android ReactNative之Cannot find entry file index.android.js in any of the roots 2018年04月02日 14:53:12 ...
- [ERROR][org.springframework.web.context.ContextLoader][main] Context initialization failed org.sprin
做一个SSH为基础框架的webapp小DEMO,复制了一把以前可以跑的代码,竟发现无法初始化数据源,报错如下: [ERROR][org.springframework.web.context.Cont ...
随机推荐
- 反接保护电路 Reverse Voltage Protection
Reverse Voltage Protection I've long wanted to pull together some reverse polarity protection ideas ...
- Go 语言中的 new() 和 make()的区别
本文是看了文章之后的心得. 在此感谢. 概述 Go 语言中的 new 和 make 一直是新手比较容易混淆的东西,咋一看很相似.不过解释两者之间的不同也非常容易. 他们所做的事情,和应用的类型也不相同 ...
- [Deepin 15] sudo source /etc/profile 提示找不到 source 命令(切换到 root 用户:sudo su)
在 Deepin/Ubuntu 系统 中,因为修改了下 配置文件,然后执行 source 命令重新加载配置文件,结果: sudo source /etc/profile 提示找不到 source 命令 ...
- CGI-- FASTCGI
http://blog.csdn.net/sweatott/article/details/54913151 CGI:是 Web Server 与 Web Application 之间数据交换的一种协 ...
- BoundingBoxUV与BoundingBoxXYZ
start UIApplication app = commandData.Application; Document doc = app.ActiveUIDocument.Document; ); ...
- Snmp学习总结(四)——WinServer2003安装和配置SNMP
一.安装SNMP 今天讲解一下在WinServer2003安装和配置SNMP,具体操作步骤如下: 找到[控制面板]→[添加或删除程序]
- xamarin 断点 不命中
Async Debugging Breakpoints not being hit breakpoint in Android library project not hit when disable ...
- UIProgressView 详解
自定义progressView 包括背景图片和进度条的图片以及进度条的高度. //进度条 UIProgressView *aProgressView = [[UIProgressView allo ...
- java初始化ArrayList
初始化ArrayList我们一般这样写:ArrayList<String> places = new ArrayList<String>();places.add(" ...
- Hyperledger 项目
https://github.com/hyperledger/fabric.githttps://github.com/hyperledger/blockchain-explorer.githttps ...