SvelteKit project reaches 1.0 release after two years, along with ‘experimental’ SvelteKit Auth

SvelteKit project reaches 1.0 release after two years, along with ‘experimental’ SvelteKit Auth

SvelteKit, an open source web application framework based on the Svelte component framework, has reached version 1.0 after two years in development.

In the announcement post the team said that Sveltekit is “ready for production use today” but also referred to future plans including “built-in i18n support, incremental static regeneration, granular control over deployment region and runtime, image optimisation, and many other improvements.” The i18next framework is a JavaScript internationalization project.

Getting started with SvelteKit

Although not the best known web framework – the 2022 StackOverflow survey showed usage by 4.58 percent of respondents, versus 42.62 percent for React.js – Svelte is influential, and the second “most loved” web technology in the same survey.

Svelte is admired for its efficiency, since it is designed to optimize the code at build time rather than using libraries that are imported by the browser at runtime. Developers also like its high productivity and easy deployment. Svelte applications are typically smaller and therefore more performant than their Next.js equivalent. Svelte can be used without SvelteKit (or its predecessor Sapper), but SvelteKit adds key functions like routing and is a complete web framework. SvelteKit uses the Vite build tool which supports hot module reloading.

SvelteKit is the official framework for Svelte and the two are developed together. The roadmap for Svelte explains that “all our focus has been on SvelteKit” and that “sometime after the release of SvelteKit 1.0, we’d like to get back to focusing on Svelte core for a while.” The next major version of Svelte will be Svelte 4 though the team said that it is “not ready to talk about it,” though it will likely involve “reimplementing big parts of the Svelte compiler.”

A distinctive feature of SvelteKit is its use of adapters, defined as “small plugins that take the built app as input and generate output for deployment.” The default adapter works on Netlify, Vercel, Cloudflare Pages, and Azure Static Web Apps. Another adapter deploys apps onto a Node.js server, while adapter-static works as a static site generator which means GitHub Pages or any web server will work. Community adapters exist for Netlify, Deno, Bun, Google App Engine and more.

Svelte was originally developed by Rich Harris, formerly at the Guardian and then graphics editor for the New York Times, but since November 2021 at Vercel, where he works on the project.

Coinciding with the release of SvelteKit 1.0, Vercel has introduced SvelteKit Auth, based on NextAuth.js, and currently described as “experimental”. SvelteKit Auth is built on a newly decoupled Auth.js library meaning, the team said, that it can “provide authentication for the Web with any framework you like.” The SvelteKit version will support “many of the most popular OAuth platforms like Google, Facebook, GitHub and more,” said Vercel.