I am using some libraries where I cannot change the js file as this is third party in the js file the library is so coded that if requireJs is used that the library is loaded in different manner below is the code from the library I have changed to keep things simple
;(function(root, factory) {
if (typeof define === 'function' && define.amd) { // AMD
define(["./abc_compressed.js"], factory);
} else if (typeof exports === 'object') { // Node.js
module.exports = factory(require("./abc_compressed.js"));
} else { // Browser
var factoryExports = factory(root.ABC);
root.ABC.library = factoryExports;
}
}(this, function(_parent_) {
//Do many things here
return $.ABC.library;
}));
I have read requireJs and no where I could find an example where in the dependent module the extension .js is used.
So need help to understand if the syntax in the third party is correct. If correct what setup in path I need do in requireJs setup so that the dependent module is loaded