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 ...
随机推荐
- LPC-Link-II Rev C JTAG
- CentOS 6.8 安装最新版 Git
CentOS 6.8 自带的 Git 版本为 1.7.1,比较旧,yum 安装也停留在 1.7.1,还是源码编译安装吧. 1. 下载源码: wget -c https://github.com/git ...
- mysql 移除服务,并在cmd下切换目录
实际中需要把注册的mysql移除, 一时忘了命令, 特此记录 在网上找的帮助 #Path to installation directory. All paths are usually resolv ...
- [Office Web Apps]实现在线office文档预览
摘要 在使用office web apps实现office文档在线预览的时候,需要注意的地方. web api web api作为owa在线预览服务回调的接口,这里面核心代码片段如下: using H ...
- 基于设备树的TQ2440触摸屏驱动移植
平台 开发板:tq2440 内核:Linux-4.9 u-boot:u-boot-2015.04 概述 之前移植了LCD驱动,下面继续移植触摸屏驱动,然后将tslib也移植上去. 正文 一.移植触 ...
- Linux source命令(转)
Linux source命令: 通常用法:source filepath 或 . filepath 功能:使当前shell读入路径为filepath的shell文件并依次执行文件中的所有语句,通常用于 ...
- iOS7中的多任务 - Background Fetch,Silent Remote Notifications,Background Transfer Service
转自:http://onevcat.com/2013/08/ios7-background-multitask/ 在IOS 7 出来不就,公司内部也组织了一次关于IOS 7 特性的的分享,今天看见on ...
- Java Date 日期 时间 相关方法
DateTools.java import java.text.SimpleDateFormat; import java.util.Date; /** * 日期操作类 */ public class ...
- pthread_join与pthread_detach细节问题
http://www.360doc.com/content/13/0106/09/9171956_258497083.shtml pthread_t pthr; pthread_create(& ...
- 能添加图标的label
能添加图标的label 效果 源码 https://github.com/YouXianMing/UI-Component-Collection 中的 IconEdgeInsetsLabel // / ...