Svelte, Tailwindcss, Daisyui, Vite, Typescript
This is a best practice for converting Svelte components to Web Components.
bun install
bun run build:website
you will see the whole demo website is ready to launch under dir dist
.
dist
├─index.html
├─wc
| ├─my-badge.js
| ├─my-button.js
| └my-dropdown.js
├─assets
| ├─app.css
| ├─app.js
| └index-DfBbDRyK.js
All the js files under folder dist/wc
are all ready to go as Web Components.
bun install
bun run build:wc
web-components
├─index-2Xyg-2dD.js
├─my-badge.js
├─my-button.js
└my-dropdown.js