Converting Ember addon to ember engine


When converting any Ember addon (say my-custom-app) to an Ember engine, what all things does it loose like ? Meaning since engines are more isolated, does it loose ability to be easily shared e.g. in case of addon, app directory files just get merged. Does the same happen with engines ? Also what about things in addon ?

In short, just wanted to understand what happens in an addon environment V/s an engine environment ?

PS: I am no referring to an in-repo addon here


Well… engines are VERY isolated compared to addons. First, there are two types of engines: routeless and routable.

Routable engines are essentially separate apps. They can share data through services, but they don’t ‘share’ files in the way you describe above (like files getting mixed into an app from an addon). If an engine and an app both need the same stuff (component for example) I believe you’d need to put that component in an addon that they both import. Routable engines can also be given references to app routes so they can transition to them. Routable engines are mounted through the applications router.

Routeless engines have a similar interface to the mounting app, but without the concept of routes. You’d primarily interact with them via a service. We’re using one to render a sidebar component in one of our apps.

Anyway, depending on how your addon worked before there could be a lot of restructuring, or at least consideration you’ll have to give to the separation of concerns and such.