Svelte custom elements (WebComponent) template with Prettier and ESLint!
The Svelte Custom Element Template is a project template designed for creating Svelte custom elements. It provides the necessary files and structure to quickly get started with building custom elements using Svelte. The template includes features such as reactivity, slots, CSS scoping, event emitting and listening, as well as helpful code comments for understanding the concepts behind building Web Components.
To create a new project based on this template, follow these steps:
git clone https://github.com/Dan6erbond/svelte-custom-element-templateyarn install in the project directory.yarn dev in the project directory.src directory, and the page in the browser will automatically update thanks to Rollup’s livereload plugin.By default, the server only responds to requests from localhost. If you want to allow connections from other computers, you can edit the srv commands in the package.json file to include the --host 0.0.0.0 option, or add the option when running the development server.
The Svelte Custom Element Template is a useful starting point for creating custom elements in Svelte. It provides essential features such as reactivity, slots, CSS scoping, event handling, and code comments to assist in the development of Web Components. By following the installation guide, developers can get started quickly and easily with building custom elements using Svelte.