Skip to content

GlimmerWrapper: Resolve modules without a default export #189

@mixonic

Description

@mixonic

Currently the implementation of RequireJSRegistry only finds default exports.

We would like it to honor named exports. There are two cases where this matters.

Case 1: named exports. For example:

// src/ui/components/my-foo.js
import Ember from 'ember';

export const helper = Ember.Helper.helper(() => {
  // some helper logic
});

We expect the absolute module identifier of ui/components/my-foo/helper would resolve this helper.

Case 2: default exports without type in the name. For example:

// src/ui/components/my-foo.js
import Ember from 'ember';

export default Ember.Component();

We expect the absolute module identifier of ui/components/my-foo/component would resolve this helper.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions