The simplest solution is just to make sure your globals get loaded first, maybe using a script tag. A more painful alternative is to move parts of the class definition into a callback function (third argument of Ext.define).

The simplest solution is just to make sure your globals get loaded first, maybe using a script tag. A more painful alternative is to move parts of the class definition into a callback function (third argument of Ext.define).

Or can surround your Ext.define in an Ext.require call, and define the class in the callback.