This repo contains a runnable demo that shows how to invoke a Svelte component from an Ember app.
pnpm install
cd app && pnpm run start
some-svelte-lib
is intended to stand in for your library package that contains a Svelte component.app
is the Ember app{{svelte}}
element modifier that can render a Svelte component into any dom element.@embroider/compat
instead, if you're using Embroider rather than the classic build pipeline.ember-auto-import
. If instead you want to make Svelte components work inside your app's own package, you would need to move svelte-loader
into the app's own babel config.ember-modifier
. It's not part of the default Ember app blueprint.svelte
so that it will definitely share the app's copy.A Big Thanks to Edward Faulkner for the inspiration. This project is based on the ember-react-example created by him.