How to detect Svelte on any website
Compile-time JavaScript framework — no runtime VDOM, components compile to direct DOM operations.
By Mapree ·
Official siteWhat is Svelte?
Svelte's killer feature is that most of it is gone at runtime: the compiler emits plain DOM-manipulation code. That's great for performance, but it also makes naive detection harder — there's no `Svelte.version` global in production builds. You detect Svelte from its compiled patterns, not from a runtime signature.
Svelte's philosophy is compile-away: the compiler translates `.svelte` components into plain JavaScript that manipulates the DOM directly, with no virtual-DOM runtime. This produces smaller bundles than React or Vue for equivalent UIs and removes an entire class of runtime overhead. The trade-off is detection: there's no `Svelte.version` accessible at runtime, no wrapper `<div id>` to find, no hydration payload global. Svelte-using sites are identified by the scoped-CSS-class patterns the compiler emits (`svelte-<hash>`) and by paths under `node_modules/svelte/internal/` in the sourcemap. Svelte 5 (2024) introduced runes — a new reactivity primitive — but the compiled output patterns remain recognisable.
Why it matters to identify
Svelte is in the New York Times, the Apple.com newsroom, and a growing number of documentation sites. Identifying it by its compiled output is a reliable differentiator from React/Vue-based stacks. Svelte apps often have noticeably smaller bundle sizes, which is a testable hypothesis once you know to look.
A brief history of Svelte
Svelte was created by Rich Harris in 2016. Svelte 3 (2019) introduced the modern compiler. Svelte 4 (2023) was a refinement release. Svelte 5 (2024) introduced Runes, a new reactivity primitive. SvelteKit, the meta-framework, reached v1 in late 2022.
Ecosystem and common pairings
Svelte pairing: SvelteKit (the canonical meta-framework), Tailwind CSS, svelte-animate, Drizzle or Prisma for data, Lucia for auth. The ecosystem is intentionally smaller and more opinionated than React's.
Detection signals we look at
Each signal alone is rarely conclusive; the detector cross-references all of them and weights by confidence. You can reproduce any of these checks yourself in Chrome DevTools.
[class^="svelte-"]|svelte-head
The Svelte compiler scopes component styles by adding `svelte-<hash>` classes.
node_modules/svelte/internal/
Svelte's runtime helpers are bundled from `node_modules/svelte/internal/`.
class="svelte-\w+"
Scoped-style class names in the rendered HTML.
Versioning
What you typically see in production
Svelte sites are unusually low-overhead in the wild because the compiler eliminates so much of what would be runtime in React or Vue. A Svelte production page often weighs less than 30 KB of JavaScript, where a comparable React page would weigh 100-200 KB. That weight difference is itself a detection signal — when you see a clearly interactive site with a tiny JavaScript footprint, Svelte (or maybe Solid) is the most likely explanation. The most reliable in-the-wild signature is the `svelte-<hash>` scoped class pattern on rendered elements, plus `node_modules/svelte/internal/` paths in the sourcemap. The compiler emits a deterministic class-naming scheme for component-scoped CSS, and the runtime helpers it does ship live under `svelte/internal/`. A page with both signals present is essentially undeniable Svelte even when the developer suppressed the typical `[data-sveltekit-...]` attributes. SvelteKit (the canonical meta-framework) is by far the dominant deployment shape. SvelteKit sites set distinctive `data-sveltekit-preload-data` and `data-sveltekit-prefetch` attributes on links, ship from `/_app/` chunk paths, and include a `<div style="display:contents">` hydration root. Plain Svelte without SvelteKit is rarer — usually a small embedded widget or a section of a larger non-Svelte site that needed compile-away interactivity. Svelte 5 with Runes is rolling into production through 2025-2026. Sites that have migrated show the `$state(...)` / `$effect(...)` rune pattern in the reconstructed source and a slightly different runtime helper surface. Older Svelte 3/4 sites look identical at the bundle level but use the legacy `$:` reactivity declaration. Both are still common in the wild because the runes migration is opt-in and incremental.
Sites commonly running Svelte
- nytimes.com (interactive pieces)
- apple.com/newsroom
- spotify.com (parts)
Often confused with
Svelte vs SvelteKit
SvelteKit is the meta-framework, Svelte is the UI layer. Every SvelteKit site is a Svelte site; the reverse is not true. SvelteKit adds `data-sveltekit-preload-data` link attributes, `/_app/` chunk paths, and the `__sveltekit_data__` hydration mechanism — all unique to the meta-framework.
Svelte vs Solid
Solid uses fine-grained reactivity in a similar JSX-shaped authoring model and produces similarly tiny bundles. Solid's signature is `node_modules/solid-js/` and `<#text>` reactive markers; Svelte's signature is `svelte-<hash>` scoped classes and `node_modules/svelte/internal/`. The two are easy to disambiguate from the bundle paths.
Svelte vs Astro with Svelte islands
Astro sites can include Svelte islands via `@astrojs/svelte`. The detection picks up Svelte for the island specifically; the surrounding shell (the `<astro-island>` markers, the `@astrojs/` runtime) tells you the island sits inside Astro rather than inside SvelteKit.
FAQ
Why doesn't Svelte expose a runtime global?
Because there essentially is no runtime — the compiler emits direct DOM manipulation code. There is no `Svelte.version` to query because there is no Svelte object at runtime to attach the version to. The version lives only in the compiler that built the bundle, recorded in `node_modules/svelte/package.json` via the sourcemap.
How do I tell Svelte 4 from Svelte 5?
Sourcemap Explorer reads `node_modules/svelte/package.json` and reports the exact version. Pattern-spotting in the reconstructed source: Svelte 5 uses `$state(...)`, `$derived(...)`, `$effect(...)` runes; Svelte 4 uses the older `let x = 0; $: y = x * 2` reactivity declaration. Both syntaxes can coexist in a Svelte 5 codebase during migration.
Is Svelte common in production?
More than the React-dominated discourse suggests, particularly for content-heavy interactive pieces (NYTimes, Apple's newsroom, Spotify's interactive features) and small-team SaaS where bundle weight matters. The total install base is smaller than React's or Vue's but the engineering investment per site tends to be high.
What's the easiest way to spot Svelte in the wild?
View Source and search for `svelte-` in the class attributes — the scoped-class signature is unmissable. Sourcemap Explorer also surfaces it from `node_modules/svelte/` paths and reports the version directly.
Does SvelteKit support Server Components?
SvelteKit has its own server-rendering model (load functions, +page.server.ts, +server.ts) that is conceptually similar but architecturally different from React Server Components. There is no 'Server Components' product per se in SvelteKit; the equivalent is the conventional split between `+page.svelte` (client + server) and `+page.server.ts` (server-only).
Related
See Svelte — with the exact version — on every site you visit.
Sourcemap Explorer runs these checks passively in the background. When the target library is bundled, you get the precise package.json-level version.