Special repo setup strictly for demoing bugs or other issues with custom elements in Svelte 4 (for use in Github issues).
Init repo
git clone https://github.com/patricknelson/svelte-v4-custom-elements.git
cd svelte-v4-custom-elements
npm i
Reproduce bug
git checkout BRANCH_NAME
npm run dev
Init base files
# select Svelte + JavaScript
npm init vite
# Install Svelte v4 (if not already present)
npm i -D [email protected]
Update Svelte compiler options in vite.config.js
to enable custom elements, i.e. customElement: true
.