SvelteKit, running on the edge
SvelteKit on the edge allows you to run a demo SvelteKit app on Vercel Edge Functions, which provides fast dynamic server-side rendering close to your users. This enables your app to achieve the speed of static content.
To enable edge functions in your SvelteKit app deployed to Vercel, follow these steps:
@sveltejs/adapter-vercel
package.npm install @sveltejs/adapter-vercel
svelte.config.js
file in your project to use adapter-vercel
instead of the default adapter-auto
.runtime: 'edge'
option to the adapter in the svelte.config.js
file.SvelteKit on the edge is a powerful feature that allows you to leverage the benefits of Vercel Edge Functions to achieve fast server-side rendering for your SvelteKit app. By following the installation guide, you can easily enable this feature and deploy your app to Vercel for optimal performance.