Reputation: 37
I often use the Ext.require()
functionality of Extjs which lets the it dynamically load the specific content.
But the documentation specifies that when released to the production environment, the dynamic loading feature should never be used. So how can I deal with so many Ext.requires()
in my code? The official doc said that the sencha cmd could solve this problem if you follow the scaffolding. But I didn't know about the sencha cmd when I wrote the code.
So, how should I update my code?
Upvotes: 0
Views: 315
Reputation: 997
The simplest way to merge all your JS files into a production build (taking care of ExtJS requirements) is to use SenchaCMD.
If you didn't follow CMD practices during development it could be quite hard. Fortunately your JS source code will not be changed, you must only be sure to have defined "requires" attribute correctly instead of using Ext.requires (otherwise it would continue to use dynamic loading...).
It really depends on you project structure and you coding style, but steps are:
Upvotes: 1