Error: multipleDefine
at l (dojo.js:2)
at Ja (dojo.js:24)
at dojo.js:25
at a (dojo.js:2)
at Xa (dojo.js:25)
at s (dojo.js:22)
at HTMLScriptElement.<anonymous> (dojo.js:27)
(function (global, factory) {
if (typeof define === 'function' && define.amd) {
define([], factory); // <- this is the branch it takes
} else if (typeof module !== 'undefined' && module.exports){
module.exports = factory();
} else {
global.ReconnectingWebSocket = factory(); // <- I think we want this
}
})(this, function () { ...
So maybe my suggesting you use LoadScript() ( which I believe is based on jQuery $.ajax ) moved you further away from the solution rather than closer.
I don't know anything about requirejs so I'm afraid I'm out of my depth here.
(function (global, factory) {
if (typeof define === 'function' && define.amd) {
define([], factory); // <- this is the branch it takes
} else if (typeof module !== 'undefined' && module.exports){
module.exports = factory();
} else {
global.ReconnectingWebSocket = factory(); // <- I think we want this
}
})(this, function () { ...
A direct import in HTML will travel down the } else { branch of the above code (which is from the uncompressed version of what we're trying to import) so ReconnectingWebSocket is added to the global namespace. I think the problem arises as SpiderBasic has RequireJS somewhere under the hood which results in a different path through that function.