-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Does not work with (lazy-loaded) engines #47
Comments
Definitely seems like a reasonable start, happy to help tweak it in a PR... |
My team recently ran into this as well when creating a new engine within our older application at ember@2.18.2. We wanted to install this as a way to start using some of the newer ember syntax, since the engine would be a greenfield project. Happy to help with anything needed to get this fix in! |
#48 seems to have stalled a bit, any folks looking for this functionality willing to pick it up? |
Only tested this with a lazy-loaded engine, but I would assume that eagerly bundled engines are also affected.
Since the runtime polyfill only patches the
buildRegistry
method of theApplication
class, it has no effect on engines:https://github.com/rwjblue/ember-angle-bracket-invocation-polyfill/blob/53afc725e13d8db63bf8006c0c906969441482de/vendor/angle-bracket-invocation-polyfill/runtime-polyfill.js#L57-L60
Which is why it causes this error:
I understand that
Application
extendsEngine
, but that this polyfill has to patchApplication
instead ofEngine
, because it needs to override some registry entries only defined inApplication
:https://github.com/emberjs/ember.js/blob/v3.4.1/packages/%40ember/application/lib/application.js#L1091-L1093
I now tried running the same polyfill for
Engine
in addition toApplication
and so far it seems to work. 🤷♂️This is not ideal for
Application
though, because the polyfill is:Engine
Application
Application
Do you still think that this is a valid solution going forward? I will submit a PR then.
The text was updated successfully, but these errors were encountered: