ember-model
ember-model copied to clipboard
ES6 import syntax not working as expected
I followed the instructions in the README re:using ES6 module imports with Ember Model but unless I'm missing something, this does not work out of the box. You need to create your own shim file in your app to expose these modules.
https://github.com/ebryn/ember-model#ember-cli--es6-modules
For example, my shim looks like this:
(function() {
function vendorModule() {
'use strict';
let { attr, belongsTo, hasMany, Model } = self['Ember'];
return {
attr,
belongsTo,
hasMany,
Model,
__esModule: true,
};
}
define('ember-model', [], vendorModule);
})();