Framework-Defined Infrastructure
New features for SvelteKit: Optimize your application with ease

New features for SvelteKit: Optimize your application with ease

6/20/2023

What this post added

This post details the integration of Vercel's framework-defined infrastructure (FDI) with SvelteKit, enabling features previously exclusive to Next.js. Key contributions include: support for per-route configuration of Serverless and Edge Functions, Incremental Static Regeneration (ISR) for SvelteKit routes, and enhanced compatibility with Vercel products like Web Analytics. It explains how SvelteKit adapters facilitate FDI by providing deployment environment-specific information. The post outlines per-route data fetching and rendering options (SSR, SSG, ISR) and function runtime choices (Node.js, Fluid compute). It provides an example of configuring ISR with an `expiration` time and mentions the `bypassToken` for cache management. It also highlights other Vercel gains for SvelteKit users, including Edge Config, Vercel KV, Postgres, Blob storage, preview deployments with commenting and visual editing, and native analytics.

Read the original post ↗