Module Unification Packages
is a new RFC, created by @mixonic
, that sets out to describe how Ember apps and addons will migrate to the new Module Unification
structure from the classic structure. This RFC iterates on and is set to replace another RFC called Module Unification Namespaces
which had some syntax, like the ::
syntax, that proved problematic.
This RFC proposes to add a new use
Something else that is proposed in this RFC is the use of a template prelude.hbs
that, at compile time
, will be injected into every template in the app. This can be used to inject global components such as the widely used t helper
used for internationalization
Services also get some appreciation
in this RFC. The suggestion is that all service injections from an addon to an app will need to be explicit about their source package. This results in more verbosity, but also greater clarity and opportunity for optimizations.
An example can be found here
There are also some proposals regarding owner APIs such as owner.lookup()
which have also become more explicit.
All in all this very well written
RFC is a great chance to learn about possible changes to Ember and the Module Unification structure. If you have any concerns or questions feel free to ask in the RFC issue
and join in on the conversation by visiting the #st-module-unification channel
on the Ember.js Community Slack.This RFC
is not complete and is a bit rough around the edges but it is a step in the right direction and will hopefully be finalized soon so that we can start using it in an Ember version in the near future.