npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

vite-plugin-svelte-devtools

v0.1.6

Published

Dev-tools panel for Svelte 5 + Vite apps — component tree, reactive state, props editor, event log, store inspector, performance profiler

Downloads

380

Readme

vite-plugin-svelte-devtools

Donate — if this saves you time, consider buying me a coffee: Donate via PayPal


Disclaimer — this project is 100% AI-written (Claude Sonnet 4.5 via OpenCode). It is published as-is for anyone who finds it useful. Contributions and bug reports are welcome.


A zero-config devtools panel for Svelte 5 + Vite apps.
Works as a native tab inside the @vitejs/devtools browser panel.

Svelte DevTools panel


Features

| Feature | Description | |---|---| | Component Tree | Live hierarchy of every mounted Svelte component | | State Inspector | Per-component $state / $derived rune snapshot | | Props Editor | Click any prop value to edit it live in the browser | | Store Inspector | Current value of every registered Svelte store | | Performance Profiler | Render count and cumulative / average time per component | | History | Pinned prop/state values with a change log | | Component Picker | Click any element in the app to jump to its component (Alt+C or Esc to cancel) | | Pause / Resume | Freeze tracking with zero runtime overhead while paused | | Open in Editor | Jump directly to a component's source file |

Note — only dark mode theming is currently supported in the devtools panel.


Requirements

| Peer dependency | Version | |---|---| | svelte | ^5.0.0 | | vite | ^8.0.0 | | @vitejs/devtools | ^0.1.0 (optional, for the native panel) |


Installation

npm i -D vite-plugin-svelte-devtools

Setup

With @vitejs/devtools (recommended — native panel)

Install the Vite DevTools plugin if you haven't already:

npm i -D @vitejs/devtools

Then wire both plugins in your vite.config.ts:

import { defineConfig } from 'vite'
import { svelte } from '@sveltejs/vite-plugin-svelte'
import { svelteDevTools } from 'vite-plugin-svelte-devtools'
import { DevTools } from '@vitejs/devtools'

const devtools = svelteDevTools()

export default defineConfig({
  plugins: [
    DevTools(),
    svelte({ preprocess: devtools.preprocess }),
    devtools.plugin,
  ],
})

Open your app in the browser, click the Vite DevTools icon, and switch to the Svelte tab.

Standalone (floating overlay)

If you are not using @vitejs/devtools, the plugin falls back to a floating Shadow DOM panel injected directly into your app:

import { defineConfig } from 'vite'
import { svelte } from '@sveltejs/vite-plugin-svelte'
import { svelteDevTools } from 'vite-plugin-svelte-devtools'

const devtools = svelteDevTools()

export default defineConfig({
  plugins: [
    svelte({ preprocess: devtools.preprocess }),
    devtools.plugin,
  ],
})

A small badge appears in the bottom-right corner — click it to open the panel.


Plugin options

svelteDevTools(options?)

| Option | Type | Default | Description | |---|---|---|---| | devOnly | boolean | true | Automatically disable during vite build |


Keyboard shortcuts

| Shortcut | Action | |---|---| | Alt+C | Toggle component picker | | Esc | Cancel component picker |


How it works

Components are instrumented automatically by the preprocessor at build time — no manual imports required.

Svelte component (instrumented by preprocessor)
  └─ __sdt_mount__ / __sdt_update__ / __sdt_unmount__
       └─ runtime/index.ts  (in-memory component tree)
            └─ HMR WebSocket  (Vite DevTools RPC)  /  CustomEvent (standalone)
                 └─ bridge.svelte.ts  ($state reactive store)
                      └─ DevTools panel  (Svelte SPA in iframe)

Commands flow in reverse (prop edits, highlight, pick mode) via the same channel.


License

MIT