I'm trying to import Underscore as a named module into my Ember CLI addon. Looking at the Standard AMD Asset section of the guides, it seems this should work:
app.import(app.bowerDirectory + '/underscore/underscore.js', {
exports: {
'underscore': ['default']
}
});
Here's the line from Underscore's source:
define('underscore', [], function() {
return _;
});
I tried to import it in one of my files, /addon/utils/class.js
:
import _ from 'underscore';
and got an error:
Could not find module
underscore
imported fromember-cli-mirage/utils/class
What'd I do wrong?