extjs 6.0 sencha cmd 只编译我的 javascript 代码 [英] extjs 6.0 sencha cmd to compile only my javascript code
问题描述
我使用 sencha extjs 6.0,它总是将所有 extjs 代码编译成一个文件.我需要的是:1 需要 extjs 编译成一个文件,我知道需要哪些包,所以它可以是静态的,不需要更改.2 然后sencha cmd 将我自己的javascript 文件编译为一个文件,这样我就可以更新到Web 服务器并让客户端下载较小的文件.因为extjs 文件大小大于600K 压缩.有人知道怎么做吗?
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?
推荐答案
进入 .sencha/app/production.properties
并添加新行:
enable.split.mode=true
然后编译,你应该得到两个文件,一个大的framework.js
和一个较小的app.js
.
Then compile, and you should get two files, one big framework.js
and one smaller app.js
.
这篇关于extjs 6.0 sencha cmd 只编译我的 javascript 代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!