I\'m incorporating SignalR into a project where I\'m already using require.js to handle my scripts dependencies.
I\'m having a little
This works for me with SignalR 1.1.2:
require.config({
baseUrl: "/",
paths: {
"jquery": "jquery-.min",
"signalr.core": "jquery.signalR-.min",
"signalr.hubs": "/signalr/hubs?"
},
shim: {
"jquery": {
exports: "$"
},
"signalr.core": {
deps: ["jquery"],
exports: "$.connection"
},
"signalr.hubs": {
deps: ["signalr.core"],
}
}
});
require(["jquery", "signalr.hubs"],
function($)
{
var hubProxy = $.connection.myHub;
// ... go to town ...
});