GitShow/sveltejs/svelte
sveltejs

svelte

web development for the rest of us

by sveltejs
compilertemplateui
Star on GitHubForkWebsitenpm

JavaScript

87.4k stars5.0k forks931 contributorsActive · 1d agoSince 2016svelte@5.56.4MIT

Meet the team

See all 931 on GitHub →
Rich-Harris
Rich-Harris5.2k contributions
Conduitry
Conduitry805 contributions
dummdidumm
dummdidumm791 contributions
github-actions[bot]Bot
github-actions[bot]627 contributions
trueadm
trueadm497 contributions
tanhauhau
tanhauhau324 contributions
benmccann
benmccann246 contributions
paoloricciuti
paoloricciuti246 contributions

Languages

View on GitHub →
JavaScript71.3%
Svelte22.3%
TypeScript4.8%
CSS1.1%
HTML0.5%

Commit activity

Last 12 weeks · 135 commits

Full graph →

Community health

6 of 6 standards met

Community profile →
87
✓README✓License✓Contributing✓Code of Conduct✓Issue Template✓PR Template

Recent PRs & issues

Active · Last activity 1d ago
See all on GitHub →
K1DV5
Compiler ignores previous plugin's source map, results in wrong source mapOpenIssue

Describe the bug Hello, I'm working on a Vite plugin (wuchale) and use to transform Svelte code and generate the source map. Sometimes, the source maps that the browser sees are sometimes wrong, and I used to check the output of wuchale and it seems correct, but then Svelte's compiler messes it up after that. Reproduction Since the reproduction can't work in the REPL, and since it is fairly small, I'll provide the files here. Start from the template in , and edit only these two files: Then run it, go to devtools, and look at the location of the message, it will be at the beginning of the script block, not at the actual location. Logs System Info Severity annoyance

K1DV5 · 11h ago
Conduitry
SSR compilation of `{let ...= $derived(...)}` can incorrectly use getter instead of actual valueOpenIssue

Describe the bug Using can, in at least some cases, result in being exposed as a _function_ that returns the appropriate value, rather than as the value itself. Client-side rendering seems to be fine, and using in the `function`. For comparison, SSR-compiles into Logs System Info Severity annoyance

Conduitry · 12h ago
reinhard-sanz
$derived on a class instance returns a stale value after the effect that incidentally owned it at construction is destroyedOpenIssue

Describe the bug A $derived declared as a class field is "owned" by whatever effect happens to be active when the instance is constructed (derived.parent = active_effect). If that instance outlives the effect, e.g. a long-lived model object that was new'd inside a component which later unmounts, the derived is frozen to its last value and never recomputes again, even though its $state dependencies keep changing. This is a regression introduced in 5.55.3 by #17921; pinning to 5.55.2 restores correct behavior. The trap is that the owning effect is non-deterministic and semantically meaningless for an object whose lifetime isn't tied to any component, it's just whichever effect was on the stack at new-time. Reproduction https://svelte.dev/playground/86e9f769bb1d4021af59f2d289b73448?version=5.56.4 Click the button twice. Expected: after step 2, box.value === 'C' so box.doubled === 'CC'. Actual (5.55.3+): box.doubled === 'BB', frozen at the value from before the child unmounted. Reading it inside a reactive context (template/$effect) instead reconnects and unfreezes it, which makes the staleness order-dependent and hard to spot. Logs System Info Severity blocking an upgrade

reinhard-sanz · 19h ago

Recent fixes

View closed PRs →
sijie-Z
fix: add bigint to Primitive type for $state.snapshotMergedPR

Fixes #18385 ## Problem infers BigInt properties as because is missing from the type definition. BigInt is a valid JavaScript primitive and is supported by . ## Solution Added to the type in both and . ## Before ```ts const object = $state({ number: 1n }); const snapshot = $state.snapshot(object); // snapshot.number is inferred as never ❌ After const object = $state({ number: 1n }); const snapshot = $state.snapshot(object); // snapshot.number is correctly inferred as bigint ✅ Tests and linting [x] This is a type-only change, no runtime behavior affected

sijie-Z · 14h ago
raydylate
Transition in each not work.ClosedIssue

Describe the bug Latest template with npx sv create. Code example. Reproduction Latest template with npx sv create. Code example. Logs System Info Severity blocking all usage of svelte

raydylate · 18h ago
Oryke
Add a note explaining that bound values using $bindable fallback values cannot be undefined.Docs default valueMergedPR

Summary Adds a note explaining the behavior of fallback values when the property is bound. The note clarifies that fallback values only apply when the property is not bound, and that binding a value of will result in a runtime error. Why This makes the documentation easier to understand by explicitly highlighting a behavior that readers might otherwise overlook.

Oryke · 1d ago
Structured data for AI agents

Repository: sveltejs/svelte. Description: web development for the rest of us Stars: 87366, Forks: 4959. Primary language: JavaScript. Languages: JavaScript (71.3%), Svelte (22.3%), TypeScript (4.8%), CSS (1.1%), HTML (0.5%). License: MIT. Homepage: https://svelte.dev Topics: compiler, template, ui. Latest release: svelte@5.56.4 (1w ago). Open PRs: 100, open issues: 960. Last activity: 1d ago. Community health: 87%. Top contributors: Rich-Harris, Conduitry, dummdidumm, github-actions[bot], trueadm, tanhauhau, benmccann, paoloricciuti, PuruVJ, baseballyama and others.

·@ofershap

Replace github.com with gitshow.dev