Svelte 5 has been released, marking what the team behind the web framework describes as the “most significant release in the project’s history” and follows 18 months of intensive development.
The latest iteration of the web framework arrives as a ground-up rewrite, promising improved performance, reduced bundle sizes, and enhanced reliability. Despite these substantial changes, the framework maintains near-complete backwards compatibility with Svelte 4, ensuring a seamless transition for most developers.
A key innovation in Svelte 5 is the introduction of ‘runes’, an explicit mechanism for declaring reactive state. This addresses limitations in the previous version’s compiler-driven reactivity system, where changing a single property would invalidate entire objects.
“Because the compiler shifts a lot of the work out of the browser and into npm run build, Svelte apps are small and fast,” the team explained. “But beyond that, Svelte is designed to be an enjoyable and intuitive way to build apps: it prioritises getting stuff done.”
The update introduces native TypeScript support, eliminating the need for preprocessors, and implements significant improvements to component composition. Event handlers are now treated as standard props, offering enhanced flexibility for library authors and developers working on larger applications.
The framework’s slot mechanism has been overhauled, replacing the previous syntax with a more powerful {#snippet …} implementation. These changes come alongside numerous performance optimisations and bug fixes.
For developers looking to upgrade, you can migrate an entire app with npx sv migrate svelte-5 or individual component migration is available through VS Code’s Svelte extension. Importantly, existing Svelte 4 applications will continue to function, allowing for gradual migration to the new syntax.
The release also introduces a new Command Line Interface (CLI) called ‘sv’, with the team promising a forthcoming version of SvelteKit that will leverage Svelte 5’s new capabilities.
Looking ahead, the Svelte team has indicated that this release establishes the foundation for future improvements that weren’t possible with Svelte 4.
See also: JetBrains launches AI model for software development tasks
Looking to revamp your digital transformation strategy? Learn more about Digital Transformation Week taking place in Amsterdam, California, and London. The comprehensive event is co-located with AI & Big Data Expo, Cyber Security & Cloud Expo, and other leading events.
Explore other upcoming enterprise technology events and webinars powered by TechForge here.
Tags: coding, css, development, framework, html, JavaScript, open source, open-source, programming, svelte, web