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 ...
随机推荐
- linearLayout 和 relativeLayout的属性区别(转)
LinearLayout和RelativeLayout 共有属性:java代码中通过btn1关联次控件android:id="@+id/btn1" 控件宽度android:layo ...
- [Go] 如何正确地 抛出 错误 和 异常(error/panic/recover)?
序言 错误 和 异常 是两个不同的概念,非常容易混淆.很多程序员习惯将一切非正常情况都看做错误,而不区分错误和异常,即使程序中可能有异常抛出,也将异常及时捕获并转换成错误.从表面上看,一切皆错误的思路 ...
- [置顶] js 实现 <input type="file" /> 文件上传
在开发中,文件上传必不可少,<input type="file" /> 是常用的上传标签,但是它长得又丑.浏览的字样不能换,我们一般会用让,<input type ...
- Netty入门实例及分析
什么是netty?以下是官方文档的简单介绍: The Netty project is an effort to provide an asynchronous event-driven netwo ...
- 霍夫曼编码(Huffman Coding)
霍夫曼编码(Huffman Coding)是一种编码方法,霍夫曼编码是可变字长编码(VLC)的一种. 霍夫曼编码使用变长编码表对源符号(如文件中的一个字母)进行编码,其中变长编码表是通过一种评估来源符 ...
- jquery 带农历天干地支的日期选择控件
效果图:
- Lua date转秒数
之前写过一篇关于把秒转换成指定的日期格式 Lua date format 接到一个需求,需要从配置文件中读取活动显示时间段:startDate ~ endDate(格式为:yyyy-mm-dd H ...
- RecyclerView常见问题解决方案,RecyclerView嵌套自动滚动,RecyclerView 高度设置wrap_content 无作用等问题
1,ScrollView或者RecyclerView1 嵌套RecyclerView2 进入页面自动跳转到recyclerView2上面页面会自动滚动貌似是RecyclerView 自动获得了焦点两 ...
- SVG渲染顺序及z轴显示问题(zIndex)
SVG是严格按照定义元素的顺序来渲染的,这个与HTML靠z-index值来控制分层不一样. 在SVG中,写在前面的元素先被渲染,写在后面的元素后被渲染.后渲染的元素会覆盖前面的元素,虽然有时候受透明度 ...
- (八十七)AutoLayout的简单介绍与实例
AutoLayout是继AutoResizing之后的一种自己主动布局方法.攻克了AutoResizing无法处理控件间相互关系的问题. AutoLayout在storyboard中通过底部工具条设置 ...