One of the things that Svelte makes easy is creating components for use in your own applications. But if you want use them with other frameworks or publish them to npm you can do this too.
There’s a publish-svelte
CLI which makes this trivial, or you can set up your build in webpack
or rollup
etc as explained below.
- publish-svelte - CLI to publish Svelte components to npm or stand-alone web components (github)
-
Custom element API (documentation)
- Rollup (github comment)
- Webpack config (github comment)
- SSR (github comment)