How do we connect an engine(not in-repo) with the application and share components and services between application and engine (not an in-repo-engine)

How do we connect an engine(not in-repo) with the application and share components/services/helpers/mixins/routes between application and engine (not an in-repo-engine)? Is 2-way access possible in such a case? Just want to know what’s the other way to share components/services/helpers/mixins/routes without using a shared addon.

Using a shared addon is the only way to share items between your app and engine. That’s really the point of an engine: isolation.

How do we connect an engine(not in-repo) with the application? @dknutsen

An engine is just an addon so you should be able to install it (like any other ember addon) and then “mount” it in the app router.js. The ember engines quickstart has a pretty solid description of all of that.

@dknutsen I connected the engine with my application using npm link and as you mentioned above. But unfortunately there in my engine ember failed to compile spread operator which I used in a component. I tried to solve that as explained in this Link . But that is not working. How would I be able to resolve this issue?

The steps in that article look right… you may need to configure that in both the app and the engine though. The engine’s index.js would be the corresponding location to ember-cli-build.js (since an engine is an addon).

1 Like