ember-cli / ember-cli/ember-load-initializers

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

Open
#277 6 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
16
Forks
33
PR merge metrics
No merged PRs in 30d

Description

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

```js
export function initialize() {}

// export default { initialize }
```

`resolveInitializer` crashes here:

https://github.com/ember-cli/ember-load-initializers/blob/b69de85ab66bfa0d857b8165e5bbc7769fba8382/addon/index.ts#L15-L16

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?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.