Hi,
I've a Config.js which is needed in my app which I've included in the Resources in SA project.
Code:
Ext.define('MyApp.Config', {
statics: {
baseUrl:'http://localhost/ws/public/'
}
});
The application works fine using preview in SA.
I wanted to create a build and have the Config.js excluded from being bundle in app.js. This is so that I can change the config easily.
My problem is that every time I create a build, I couldn't run as I got an error.
Uncaught TypeError: Ext.define is not a function
at Config.js?_dc=1490690335498:1
I notice in the minified app.json
.....,"js":[{"path":"Config.js"},{"path":"app.js"}]....
Config.js got loaded before app.js. This cause the Ext.define not valid
I reverse the order
.....,"js":[{"path":"app.js"},{"path":"Config.js"}]....
This time no error and I am able to run the app succesfullly.
Question:
1. What do I set in SA to ensure that Config.js gets loaded last?
requireSdk suppose to set the class to be compile after but it doesn't work
Screen Shot 2017-03-28 at 5.13.59 PM.png
2. Is there any other better way to define configuration for the Application?
Any feedback will be very much appreciated.