Skip to content

ES6 import syntax not working as expected #482

Open

Description

@patocallaghan

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);
})();

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions