I encounter a problem with this code:
console.log('Before define Foo.Bar');
Ext.define('Foo.Bar', {
requires: [
'Foo.Some'
],
singleton: true,
constructor: function () {
console.log('Foo.Bar constructed');
console.log(Foo.Some);
}
});
console.log('Before define Foo.Some');
Ext.define('Foo.Some', {});
In the production build, I get an error when I try to use Foo.Some in the Foo.Bar constructor => "Foo is undefined".
Is there anything I can do?