Ionic:如何在发布之前丑化和缩小我的代码? [英] Ionic: How to uglify and minify my code before release?

查看:119
本文介绍了Ionic:如何在发布之前丑化和缩小我的代码?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正准备发布我的第一个使用离子的app构建。我对如何缩小和验证我的代码感兴趣?有没有插件?

I am getting ready to release my first app build in ionic. I am interested in how I can minify and uglify my code? Are there any plugins for that?

谢谢

uksz

Thanks
uksz

推荐答案

使用 ionic cordova build< platform> --prod --release 会为你创建一个应用程序的发布版本,代码是uglyfied和minified。

Using ionic cordova build <platform> --prod --release will create you a release version of the app with the code uglyfied and minified.

还运行一个简单的 ionic cordova build< platform> 也将完成这项工作。缩小和丑化的js位于 www 文件夹中 main.js

Also running a simple ionic cordova build <platform> will also do the job. The minified and uglyfied js is located on the www folder as main.js

请记住缩小和丑化源代码的内容是 ionic-app-scripts

Take in count that what minifies and uglyfies the source code is ionic-app-scripts.

这篇关于Ionic:如何在发布之前丑化和缩小我的代码?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆