Awesome
svelte-web-component-builder
A base for building shareable Svelte components as Web Components. Clone it with degit:
npx degit LunaTK/svelte-web-component-builder
cd svelte-web-component-builder
npm install # or yarn
Your component's source code lives in /src
.
Setting up
- Run
npm install
(oryarn install
)
Building your own components
- Make your own Svelte components
- Include your components in
src/index.js
. Otherwise, it will not be included in build output - Run
npm run build
on your terminal - Build outputs are in
build/
Sample
test-module.html
: Use Svelte component as ESM moduletest-web-component.html
: Use Svelte component as Web Component
Original repository
This repository is forked from sveltejs/component-template
For more basic information, please visit the original repository.