Svelte kit makes it easier to publish packages on npm using svelte-package. We can both have the npm package and docs web page in a single repo. Svelte also automatically generate types for our svelte component and js files.
- Create Svelte project
pnpm create svelte@latest my-package
- CD into the project