What’s new in Svelte: January 2025

From new syntax to improved dev tooling, the Svelte team has been busy this month building new features in both Svelte and SvelteKit. And as we round the corner into the new year, there’s even more to look forward to... like the 10th Svelte Summit! Join the Svelte community online or in-person in Barcelona: May 8th and 9th.

Now let’s get to the news 👀

What’s new in Svelte

  • Snippets can now be exported from module scripts (5.5.0, Docs, #14315)
  • defaultValue and defaultChecked are now supported for inputs (5.6.0, Docs, #14289)
  • The loose parser mode creates a more modern AST for developer tools to consume (5.13.0, Docs, #14691)
  • A new “worker” exports condition helps better support bundling for worker-based environments (5.15.0, #14779)
  • The class attribute can now be an object or array, using clsx (5.16.0, Docs, #14714)

New/Updated Syntax

  • <svelte:boundary> is a new special element that can capture errors that occur from within its subtree during client rendering (5.3.0, Docs, #14211)
  • #each is now supported without as (5.4.0, Docs, #14396)
  • The new Spring and Tween classes in svelte/motion make it even easier to build custom animation (5.8.0, Docs, #11519)
  • The new outro option in unmount will play transitions before the component is removed from the DOM. (5.13.0, Docs, #14540)
  • The $inspect.trace rune causes the surrounding function to be traced in development. Any time the function re-runs as part of an effect or a derived, information will be printed to the console about which pieces of reactive state caused the effect to fire (5.14.0, Docs, #14290)

Reactivity APIs

  • createSubscriber creates reactive values that depend on subscriptions (5.7.0, Docs, #14422)
  • The reactive MediaQuery class creates a media query and provides a current property that reflects whether or not it matches (5.7.0, Docs, #14422)
  • Getters and setters can now be bound to with bind (5.9.0, Docs, #14307)
  • The svelte/reactivity/window module exports reactive versions of various window values, each of which has a reactive current property that you can reference in reactive contexts (5.11.0, Docs, #14660)

What’s new in SvelteKit, Svelte CLI and Language Tools

  • The new init hook runs once, when the server is created or the app starts in the browser, and is a useful place to do asynchronous work such as initializing a database connection (2.10.0, Docs, #13103)
  • The new transport hook allows you to encode/serialize and decode/deserialize custom non-POJOs across the server/client boundary (2.11.0, #13149)
  • The new $app/state module replaces the existing $app/stores module but using Svelte 5 state. The migrate tool in the CLI/language tools have been updated to match (2.12.0, Docs, #13140)
  • bundleStrategy lets you choose between 'split', 'single' and 'inline' output options for JS and CSS files (2.13.0 and 2.15.0, Docs, #13173 and #13193)
  • The new sveltekit-adapter add-on for the Svelte CLI (sv) installs and replaces existing SvelteKit adapters (Docs, #346)
  • The language tools extensions will now make use of loose Svelte parser and provide better intellisense (109.4.0, #2631)

Adapter Updates

  • adapter-auto has added support for the bun language server (3.3.0, #12854)
  • adapter-cloudflare-workers now supports wrangler.json config files (2.7.0, #13151)
  • adapter-cloudflare will now generate an .assetsignore file for use with Cloudflare Workers Static Assets (4.9.0, #13109)

Community Showcase

Apps & Sites built with Svelte

  • Tokeko is an educational platform designed to help users understand and learn about different types of parsers, grammar structures, and parsing techniques
  • QuickFlags is a fast paced, simple, flag knowledge game
  • Hotspotter is an incentivized crowdsensing system that collects, maps, and visualizes WiFi and cellular data to pinpoint hotspots and dead zones for the effective visualization of network coverage
  • Writastic is an AI social media writing assistant to optimize your content with the best strategies of successful creators
  • Walle is a macOS chatbot app that lets you interact with Claude, GPT, and Gemini simultaneously
  • Fli.so is a free, modern open-source link shortener
  • VRDB is a comprehensive database for Meta Quest Store, App Lab, and VR games
  • sv-resize-image resizes images using just the browser
  • WickGPT is an online tool to generate fake clips of chatGPT responses
  • other.supply is a virtual vinyl shop that simulates the record-flipping experience

Learning Resources

Featuring Svelte Contributors and Ambassadors

This Week in Svelte

To Read

To Watch

Libraries, Tools & Components

  • The Svelte docs are now available in an LLM-friendly format (shout out to Stanislav Khromov for svelte-llm)
  • svelte-mainloop is awrapper for MainLoop.js that handles function registration and cleanup, and lets you join and leave the loop with a single component (Reddit)
  • bsky-comments-svelte is a simple customizable component to add comments to your website using Bluesky
  • Svelte Mini Router is a declarative, minimal SPA router for Svelte 5, without SvelteKit
  • svelte-firebase-state simplifies Firebase integration in Svelte/Sveltekit applications by providing easy-to-use reactive state classes for managing Firestore and Realtime Database data
  • monoco-svelte lets you create custom (squircle) corners and borders for Svelte components
  • svelte-audio-waveform transforms an array of peak data into beautifully rendered, customizable waveforms for music players, podcasts, audio editing tools, and more
  • Svader creates GPU-rendered Svelte components with WebGL and WebGPU fragment shaders

That’s it for this huge month in Svelte! Let us know if we missed anything on Reddit or Discord.

Happy new year! 🥳

https://svelte.dev/blog/whats-new-in-svelte-january-2025
Created 5d | Jan 1, 2025, 2:10:05 PM


Login to add comment

Other posts in this group

What’s new in Svelte: December 2024

A better CLI and a bunch of UI libraries now support Svelte 5 https://svelte.dev/blog/whats-new-in-svelte-december-2024

Dec 2, 2024, 10:30:08 PM | Svelte
Advent of Svelte

Twenty-four days, twenty-four features https://svelte.dev/blog/advent-of-svelte

Dec 1, 2024, 4:20:05 PM | Svelte
What’s new in Svelte: November 2024

New features in Svelte 5 and a ton of new community libraries https://svelte.dev/blog/whats-new-in-svelte-november-2024

Oct 31, 2024, 10:50:03 PM | Svelte
Introducing the new Svelte CLI

Tailwind, auth, databases and more — just an npx sv away https://svelte.dev/blog/sv-the-svelte-cli

Oct 25, 2024, 4:10:06 PM | Svelte
Svelte 5 is alive
Oct 22, 2024, 6:40:05 PM | Svelte
The Omnisite

Your one-stop-shop for everything Svelte https://svelte.dev/blog/the-omnisite

Oct 22, 2024, 6:40:05 PM | Svelte
What's new in Svelte: October 2024

Better each blocks and a callstack for infinite loops https://svelte.dev/blog/whats-new-in-svelte-october-2024

Oct 2, 2024, 4:10:08 PM | Svelte