Develop, deploy, and dynamicallly load component "plug ins"


We have a desire to build components that plug into our main application, also an Ember application. Currently we build all these components in an addon, and then include that addon into our main application. This does allow us to keep separate and fairly decoupled, but ultimately we have to deploy the entire application to get new components, and all components have to be included in deliverable. In an ideal scenario, we’d be able to:

  1. Lazy load components as needed. We have large set of components, and only a subset are every really needed.
  2. Develop AND deploy said components completely independent of our main application. This would allow us to make quick rapid changes to small components without having to completely deploy our entire app, which is starting to get large.

I’ve seen Ember engines, but a cursory inspection suggests it is best used to deliver a singular app experience that is actually a composition of multiple complete applications.

For us, we just have a large bank of components that we’d ideally like to see the above benefits. What we are doing still works, but certainly slows down our development process, and also results in a large deliverable

Is this even doable? Has anyone done anything similar to this? Any help or direction would be great.


I want what you’re describing too…but I think we’re a ways off from something that can do this automatically.

I think this RFC is the first thing I’ve seen that would land an “official” API that gives the tools you’re seeking.

In the meantime, I suppose you can look to using ember-asset-loader without using Engines as a way of having additional assets (a component library in your case) that are loaded on-demand. (You’d still have to make your addons build its assets into a different asset).

Not knowing how your app is built, I would guess that the tricky part is going to be figuring out how do divide up the component library and expressing what depends on what so you know which divisions to load when. But, if you do end up trying, I’d be really curious to hear about what you learn!