What Svelte 4 brings to the framework, as of June 2023
The Svelte team has officially released Svelte 4, four years after launching Svelte 3. This release incorporates updates from Node.js and browser APIs, keeping the framework relevant and efficient. The update touches every layer of the framework, from the compiler to the developer experience.
Enhanced Performance#
Performance remains a core focus of Svelte 4. The package size reduction of 75% benefits users of the Svelte REPL, the interactive learning environment on learn.svelte.dev, and developers operating in low connectivity environments. Smaller packages mean faster downloads and installation speed.
The dependency count dropped from 61 to 16. Fewer dependencies lead to quicker downloads and reduce the risk of supply chain attacks. This simplified dependency graph makes the framework more secure and maintainable.
Streamlined Developer Experience#
Svelte 4 improves the custom elements authoring process, making it more consistent and intuitive. The IDE now supports cmd+click navigation directly to implementation files, improving code exploration. Svelte internal file imports are hidden from autocomplete to reduce noise.
Additional enhancements include new defaults for transitions, simplified preprocessors, and easier content security policy configuration. These improvements reduce friction when building with Svelte.
Revamped Svelte Website#
The Svelte website received a complete redesign to serve developers better. A new multi-page structure organizes content more intuitively. Mobile navigation improved to support developers working on phones and tablets. TypeScript documentation expanded to cover more scenarios.
Dark mode support lets developers work in their preferred environment. The REPL received upgrades, making interactive learning faster and more responsive. The SvelteKit site reflects these same improvements, creating a cohesive learning experience.
Preview of Svelte 5#
Svelte 5 is in active development with an ambitious scope. The team is completely overhauling the compiler and runtime to enable new capabilities. Svelte 4 lays essential groundwork for this major release.
The next version will bring further performance gains and major new features that reshape how developers build with Svelte. Version 4 represents a solid step forward and a stable platform for projects built today.