The purpose of this repository is to load a built Svelte component using a script tag.
<script src="components.js"></script>
https://github.com/simiraaaa/test-svelte-build-for-vanilla/blob/main/vite.config.js
npm i
npm run build
open ./test.html
npx http-server
and open http://127.0.0.1:port/test.html
in your browser.
npm run dev
$lib
.npm create svelte@latest
┌ Welcome to SvelteKit!
│
◇ Where should we create your project?
│ (hit Enter to use current directory)
│
◇ Directory not empty. Continue?
│ Yes
│
◇ Which Svelte app template?
│ Library project
│
◇ Add type checking with TypeScript?
│ Yes, using JavaScript with JSDoc comments
│
◇ Select additional options (use arrow keys/space bar)
│ none
│
└ Your project is ready!
npm i
git init && git add -A && git commit -m "Initial commit"
...