I'm using ExtJS 5.0.1 with Sencha Cmd to build a production version:
sencha app build -c production
I'm serving Socket.IO libraries directly from my NodeJS HTTP server and referencing them in the ExtJS app.json file:
"js": [
{
"path":"/socket.io/socket.io.js"
}
,...]
Then in my code, I'm calling the global io():
Ext.define('MyController',{
extends:'Ext.app.ViewController',
myFunction:function(){
var socket = io();
// do something with socket
}
};
This all works fine when viewing my project in the browser but my Sencha cmd build process fails with an error:
2014-10-17 17:07:44.457 phantomjs[12931:d07] CoreText performance note: Set a breakpoint on CTFontLogSuboptimalRequest to debug.
registering ready listener...
loading widget definitions...
rendering widgets...
== Unhandled Error ==
ReferenceError: Can'''t find variable: io
I'm sure this is a case of missing the blindingly simple, somewhere I define which globals Sencha should expect to have access to.
Much thanks in advance!