Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ES6 import syntax not working as expected #482

Open
patocallaghan opened this issue May 3, 2018 · 0 comments
Open

ES6 import syntax not working as expected #482

patocallaghan opened this issue May 3, 2018 · 0 comments

Comments

@patocallaghan
Copy link
Contributor

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);
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant