I am currently loading socket.io client library through the automatic URL provided:
requirejs.config({
urlArgs: "b=" + ((new Date()).getTime()),
baseURL: "/javascripts/",
paths: {
/*other libaries here*/
io: "/socket.io/socket.io"
},
shim: {
"io" : {exports: "io"}
}
});
This works, however doesn't use mimosa's minifying capabilities as it can't find the local file. It also gives me an annoying error on startup.
2:37:34 - Dependency [[ /socket.io/socket.io ]] for path alias [[ io ]], inside file [[ dr/public/javascripts/common.js ]], cannot be found.
12:37:34 - Dependency [[ io ]], inside file [[ dr/public/javascripts/app.rq.js ]], cannot be found.
12:37:34 - Shim path [[ io ]] inside file [[ dr/public/javascripts/common.js ]] cannot be found.
Is the socket.io.js libary available in the socket.io npm package for example so I can just include it as a filepath? I've also tried installing the socket.io client libary through bower and then including it, but that didn't work properly.
Detailed discussion can be found here:
https://github.com/dbashford/mimosa/issues/338#issuecomment-31974008
In summary:
Not an ideal solution, but it works for now: