How to create and publish Svelte components

Samuele
5 min readOct 15, 2021

In my last articles I have mainly talked about how to integrate Svelte, Tailwind, Jest and how to use NPM. Why all this? To get to understand how to create a Svelte component and how to publish it as an NPM package. Below, as is my habit now, I report the various steps I followed and the link to a template that should simplify everything.

Create components with SvelteKit

--

--

Samuele

I'm a hobby programmer, experimenting with Svelte, Javascript, Construct 3 and magic tools