I have converted my existing ExtJS 4.1.3 application to use the Sencha CMD recommended structure and tools. I created the structure first, then put my existing app JS files at the place where the single-page JS app should be located.
I currently access the development version of my application at:
{my-server-side-app-url}/sws/dt/index.jsp
where sws
is the Sencha workspace and dt
is the Sencha single-page app. So far, no problems I believe. Then I run the command:
sencha app build
within my app
's directory. This completes with several Yui Compressor Warning (Trailing comma is not legal in an ECMA-262 object initializer
warnings, but no errors. So I the production index.jsp
page (which uses all-classes.js
file, which receives the concatenated output of the app build
command above) at URL:
{my-server-side-app-url}/sws/build/dt/production/index.jsp
The issue occurs when all-classes.js
attempts to load several files which in theory should be included within itself. These include the controllers which are specified in app.js.
Why are these files not being concatenated in all-classes.js
? Below is a screenshot of Chrome attempting to load them from all-classes.js
, and of course not finding them.
What did I try?
Tried to tweak my app.js
to require the controllers via requires
; or to make the classes required available via uses
as recommended by this question/answer pair, but to no avail.
sencha generate app
to generate my app, and it works for me... In your case only your custom classes don't load? – Babushkabelongsto.js
andhasmany.js
which are referred to by my own model classes; indeed only these model classesApp
andWindow
are not loading. Will try to play with them, but really can't understand why I see no prob with dev, and at production it simply doesn't work. – Stacystadholder