It looks like a bug, but I think Sencha are pushing towards using a microloader rather than just including the app.js file and the css ones. So my short answer is both! :)
Now the long one:
I was playing with setting up an ExtJS application that is to live far away from the webroot and at the same time to be available in both, development and production modes (environments).
Setting the app.json of the Sencha CMD app, so the microloader.js to load the required js and css files, proved a bit of a challenge.
My folder setup is as per below:
(Note, my build folder is outside the Sencha CMD application folder - MyApp - just to have the same path depth)
index.cfm
/far/away/from/web/root
....
/build
/resources
app.js
app.json
microloader.js
...
/MyApp
/.sencha
/ext
app.json
app.js
bootstrap.js
....
MyApp/app.json
{
/**
* The application's namespace.
*/
"name": "MyApp",
/**
* The relative path to the appliaction's markup file (html, jsp, asp, etc.)
*
* Below setting seems relevant for proper loading MyApp/bootstrap.js
*/
"indexHtmlPath": "../../../../../index.cfm",
......
"output": {
"base": "${workspace.build.dir}",
"page": {
/**
* Below is relative path from the build folder to the application markup file
*/
"path": "../../../../../index.cfm",
"enable": false
},
"microloader": {
"path": "microloader.js",
"embed": false,
"enable": true
},
"manifest": {
"path": "app.json",
"embed": false,
"enable": "${app.output.microloader.enable}"
}
},
/**
* Uniquely generated id for this application, used as prefix for localStorage keys.
* Normally you should never change this value.
*/
"id": "f6cd3e2b-6a0c-4359-a452-e07adda808ae"
}
Initially, in order to use the production build, was loading directly /far/away/from/web/root/build/app.js file and it throw the same error:
Uncaught TypeError: Cannot read property 'baseUrl' of undefined
Now, with the app.json configured as per above, I can pick in my index.cfm whether to load:
for production - /far/away/from/web/root/build/microloader.js
for development - /far/away/from/web/root/MyApp/bootstrap.js
I hope this helps someone.
Cheers,
Pencho