embroider-build / embroider

Compiling Ember apps into spec-compliant, modern Javascript.
MIT License
331 stars 137 forks source link

Provide a new way to load initialisers that doesn't use require.entries #1961

Open mansona opened 1 month ago

mansona commented 1 month ago

In https://github.com/embroider-build/embroider/pull/1780 there was an attempt to fix the timing issues around loading initialisers but it wouldn't guarantee that things would happen with the right timing.

Also we should not be using the ember-load-initializers package because it 100% relies on require.entries (which we should not be baking into the modern app boot process).

Tasks to get this done

BlueCutOfficial commented 1 week ago

It turns out the last task...

implement a new loadInitialisers() function that will take named initialisers from the "entrypoint" exported modules and set them up correctly

... was not necessary to support initializers. Nonetheless, a PR has been opened as getting rid of require is still relevant on the long run: ember-cli/ember-load-initializers#305