extjs 6.0 sencha cmd只能编译我的JavaScript代码 [英] extjs 6.0 sencha cmd to compile only my javascript code

查看:140
本文介绍了extjs 6.0 sencha cmd只能编译我的JavaScript代码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用sencha extjs 6.0,它总是将所有extjs代码编译为单个文件。我需要的是:
1需要将extjs编译为一个文件,我知道需要哪些包,所以它可以是静态的,不需要改变。
2然后sencha cmd将我自己的javascript文件编译为一个文件,所以我可以更新到Web服务器,让客户端下载更小的文件。因为extjs文件大小大于600K压缩。
任何人都有想法如何做?

解决方案

进入 .sencha / app / production.properties 并添加一行:

  enable.split.mode = true 

然后编译,你应该得到两个文件,一个大的 framework.js 和一个较小的 app.js


I use sencha extjs 6.0 ,and it always compile all extjs code to single one file .What I need is that : 1 the need extjs is compiled to one single file ,I know which packages are needed ,so it can be static and not need to change . 2 then sencha cmd compile my own javascript file to one single file ,so I can update to web server and let client download it less size file .Because the extjs file size is large than 600K with compression . Anyone have idea how to do it?

解决方案

Go into .sencha/app/production.properties and add a new line:

enable.split.mode=true

Then compile, and you should get two files, one big framework.js and one smaller app.js.

这篇关于extjs 6.0 sencha cmd只能编译我的JavaScript代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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