I asked this question here: javascript - UMD With Ember-CLI - Stack Overflow
I am trying to load the gridstack in my Ember application via ember-cli. I installed the application via bower and imported in my ember-cli-build.js file. It includes _ as a library via:
if (typeof define === 'function' && define.amd) {
define(['jquery', 'lodash'], factory);
}
define.amd evaulates to false
I looked into why this is the case , and found that ember-cli’s loader doesn’t support UMD. On an open cli issue, Stefan Penner, one of the main cli developers, suggested:
This is by design. As this library requires a pre build step to de-anonymize the modules. That step can do the appropriate munging to work correctly
I have no clue what that means. I got around the issue by manually importing the dependencies of this library in my own ember-cli-build before this library but that’s defeating the purpose of dependency management. How can I make this library resolve its own modules?