https://github.com/patricknelson/svelte-v4-custom-elements
For demoing custom elements in Github issues
https://github.com/patricknelson/svelte-v4-custom-elements
Last synced: 2 months ago
JSON representation
For demoing custom elements in Github issues
- Host: GitHub
- URL: https://github.com/patricknelson/svelte-v4-custom-elements
- Owner: patricknelson
- License: mit
- Created: 2023-07-11T23:17:59.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2023-07-12T01:29:54.000Z (almost 3 years ago)
- Last Synced: 2025-01-19T16:32:22.590Z (over 1 year ago)
- Language: JavaScript
- Homepage:
- Size: 40 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# svelte-v4-custom-elements
Special repo setup strictly for demoing bugs or other issues with custom elements in Svelte 4 (for use in Github issues).
## Get started
Init repo
```bash
git clone https://github.com/patricknelson/svelte-v4-custom-elements.git
cd svelte-v4-custom-elements
npm i
```
Reproduce bug
```bash
git checkout BRANCH_NAME
npm run dev
```
## From scratch
Init base files
```bash
# select Svelte + JavaScript
npm init vite
# Install Svelte v4 (if not already present)
npm i -D svelte@4.0.0
```
Update Svelte compiler options in `vite.config.js` to enable custom elements, i.e. `customElement: true`.