Open yamsellem opened 11 years ago
The whole point of modules is not to add a global, it is working as intended. Backbone is doing it wrong and underscore does not attach itself to global.
This issue (grabbed from its 2012's grave) is offering a working solution to the incompatibility of accounting and AMD (I don't even know is the 0.4 release have fixed this). Saying that this solution is not good without offering an alternative seems counterproductive to me.
As of 0.3.2, this is the code I see, which works fine with AMD:
} else if (typeof define === 'function' && define.amd) {
// Return the library as an AMD module:
define([], function() {
return lib;
});
}
We are using accounting 0.3.2 with requirejs 2.0.6: accounting is properly loaded but it is not accessible like Underscore or Backbone.
Replacing the last lines of the script with those used in Underscore.js makes everything work: