Skip to content

Embroider crash when initializer/instance-initializer does not have a default export #277

@mehulkar

Description

@mehulkar

If you have an initializer that does not have a default export:

export function initialize() {}

// export default { initialize } 

resolveInitializer crashes here:

var initializer = module['default'];
if (!initializer.name) {

This function only seems to be called when I enable Embroider builds, not in regular ember-cli builds, so I'm not sure if this is intentional or what the expectations are.

ember-cli could be stricter and require this default export, but if it's intentional to not require the default export, then resolveInitializer should handle this case as well?

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