Reuse ember components on non ember websites

I am using ember for quite a few years now, but I have not looked into glimmer itself very much so far. I would like to make specific components of my ember app available to be used on other websites (like a player that can be used on other websites by pasting code that would load the necessary js files etc).

I am thinking about writing these components as glimmer components, so I will not necessarily need to load the whole ember runtime when being used outside of an ember app.

Are there any resources available on how to make certain parts of an app available to be used independently? Has anyone done something similar so far? What were your experiences?

I think your idea to share glimmer components between Ember apps and Glimmer apps could work. There are some things to consider. First is the situation of what you want from embedding. Obviously an iframe is easiest and i have more to say about that later. The other is mutating the current page. (Containing to a single div)

I know there has been some work in this latter point with ember-islands.

For the iframe Route I wrote ember-quine an interesting addon to encapsulate a whole ember app into a single HTML file.

Maybe some of these could help you.

1 Like