Sharing components between ember engines and app

Say there’s a component I want to use in both the ember engine and app. How do I share it between both in a effective way?

The officially condoned solution would be to put the component in an addon and use the addon in both the app and the engine (components must be re-exported into the engine namespace). See the engines guides for more specifics.

If that seems to unpalatable for whatever reason I feel like I’ve seen another approach discussed in a thread here recently but I can’t seem to find it offhand. Maybe poke around a little bit.

1 Like

Yeah, @dknutsen. Is it the same for in-repo addons ?

Yeah other than the specifics of how they are configured in-repo addons should function the same as any other so all of the above should still apply.

1 Like