This is the official svelte plugin for vite
Package | changelog |
---|---|
@sveltejs/vite-plugin-svelte | changelog |
Join svelte discord
- run
pnpm i
to install - run
pnpm dev
inpackages/vite-plugin-svelte
to autobuild plugin - run
pnpm dev
inpackages/playground/xxx
to start vite
changes in plugin need restart of dev server
- For typescript, svelte components must use
<script lang="ts">
, not<script lang="typescript">
otherwise vite dep scan fails. see https://discord.com/channels/804011606160703521/804062134051930222/806300072349270033 - exclusions in optimizeDeps also cover children (x or startswith x+/)
- svelte components should be sorted with style nodes last as js code may contain markup node positions
- svelte and vite creators, maintainers and contributors
- rixo - without svelte-hmr and your support this would not have been possible
- intrnl - initial inspiration from https://github.com/intrnl/vite-plugin-svelte