svelte-preview Svelte Themes

Svelte Preview

Svelte Viewer

Single-file Svelte previewer for VS Code. Opens a live preview of any .svelte component inside the editor.

Features

  • Preview any .svelte file in a side panel or custom editor
  • Vite dev server started automatically on first use
  • Open the preview in your default browser from the webview toolbar

Usage

  1. Open a .svelte file
  2. Click the Svelte Viewer icon in the editor title bar
  3. Or run Svelte Viewer from the command palette

You can also right-click in the editor and choose Svelte Viewer, or use Open With → Svelte Viewer.

Requirements

  • VS Code 1.88+
  • Node.js (used by the embedded Vite server)

On first activation the extension installs its Vite dependencies automatically (~5 s, requires internet).

Local Development

npm install
cd preview-app && npm install && cd ..
npm run build

Packaging

npx vsce package
# or use the helper script:
./quickbuild.zsh

License

MIT

Top categories

Loading Svelte Themes