Urgent.News

What's breaking now, across thousands of outlets.

Tech

SvelteKit 3 Reaches Release Candidate, Moving Config to Vite and Retiring the $lib Alias

The Svelte team has entered the release candidate phase for SvelteKit 3, which focuses on code refinement and prepares for future updates. Notable changes include moving configuration to vite.config.ts, replacing the $lib alias with #lib for improved compatibility. SvelteKit 3 requires Vite 8 and Svelte 5, enhancing error handling and build efficiency, while retaining some experimental features.…

SvelteKit 3 has entered the release candidate phase, marking a significant shift in the framework's configuration and a retirement of the $lib alias. The update streamlines the configuration process by moving it to vite.config.ts, allowing the Vite plugin to read it synchronously, thus eliminating the asynchronous resolution step.

The $lib alias, previously used for Node's subpath imports, is being replaced by the #lib alias, aligning with Node's native subpath imports. Developers will now need to include file extensions, changing $lib/foo to #lib/foo.js. The migration guide suggests using the CLI command for a smooth transition. Despite initial resistance, the change is expected to benefit from being in line with Node's package.json alias definition.

Other noteworthy updates include the integration of Svelte 5, improvements in error handling, and the requirement of Vite 8 and its Rollup bundler for enhanced build performance. Remote functions, a type-safe client-server RPC approach, are also in the experimental phase. SvelteKit 3 continues to serve as the official application framework for Svelte, providing full-stack web application capabilities with Svelte's reactive syntax and smaller runtime.

Written by urgent.news from InfoQ's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at infoq.com →

More in Tech

More from Wednesday 30 September →