ember-cli-hot-loader icon indicating copy to clipboard operation
ember-cli-hot-loader copied to clipboard

Support for ember resolver v5.0.1

Open toranb opened this issue 6 years ago • 9 comments

PR 243 for ember resolver removed the DefaultResolver that this hot loader relied on to properly resolve templates. I spent a good deal of time today trying to reverse engineer how we might otherwise resolve without the DefaultResolver but at this time I don't have a solution to write home with. If anyone has time to pitch in and unlock support for ember-resolver v5 that would go a long way to helping this project support ember-cli > 3.3

toranb avatar Oct 19 '18 20:10 toranb

@toranb we might need to ping @krisselden or @rwjblue?

This definitely hit me today and it was something I was surprised by in a new 3.5 project...

rtablada avatar Oct 24 '18 16:10 rtablada

Can you share where we use the DefaultResolver in this addon?

rwjblue avatar Oct 24 '18 21:10 rwjblue

@rwjblue I didn't reach out on purpose so not to worry. I don't think this project warrants any type of core team support, etc. The fact that we hijack the resolveTemplate method in this addon is the issue. We need to re-think how this resolve works for the wrapper component (or extend outreach via RFC to prevent this type of issue from happening in the future as discussed in a few other forums).

As this happened I was in the middle of working to transfer the addon to a different organization (Adopted Ember Addons) in hopes that someone with more bandwidth and drive would feel up to resolve this + the other issues that have pop'd up since ember-cli v3.4 shipped.

I'll keep you all updated as this transfer happens if you want to partner up and source dive into resolver specifics at some point. Robert/ and I discussed landing a primitive "reload" like method that components could use helping this project eliminate the custom resolver altogether :)

That^ would be a huge step forward and I know something did actually land on ember master after EmberCamp in late September but I've not followed up myself to see what next steps look like.

toranb avatar Oct 24 '18 23:10 toranb

@toranb ah cool thanks for the extra context.

rtablada avatar Oct 24 '18 23:10 rtablada

@knownasilya looks like you in context of resolver, do you have an ideas?

lifeart avatar Oct 29 '18 11:10 lifeart

Not really familiar with the resolver to be useful here.

knownasilya avatar Nov 05 '18 14:11 knownasilya

I was thinking, that at least for components we could use an HOC instead and just re-export the components instead of relying on the resolver. That way, as far as all ember code is concerned it will be a single component from the expected path but our exports would be rewritten to something like export default withHotReload(OriginalComponent)

MiguelMadero avatar Dec 09 '18 11:12 MiguelMadero

@MiguelMadero ember-ast-hot-load addon doing kinda like this, replacing all component invocations with helper wrapper.

lifeart avatar Dec 09 '18 14:12 lifeart

That's good to know, I wasn't aware of that addon. It has been a while since I worked with Ember, but I'm still keeping an eye on ember-cli-hot-loader and a few other things out of personal interest.

MiguelMadero avatar Feb 11 '19 08:02 MiguelMadero