Skip to content

SvelteKit at the Edge

A SvelteKit app rendered with Edge Functions.

Framework Svelte
Use Case Starter
CSS CSS
Publisher Rich Harris

SvelteKit on the edge

A demo SvelteKit app running on Vercel Edge Functions, which run close to your users to enable dynamic server-side rendering at the speed of static content.

How to enable edge functions in your SvelteKit app deployed to Vercel

While the Vercel Build Output API is in beta, you'll need to add the ENABLE_VC_BUILD environment variable with a value of 1 to your project on vercel.com.

Developing

Once you've created a project and installed dependencies with npm install (or pnpm install or yarn), start a development server:

npm run dev

# or start the server and open the app in a new browser tab
npm run dev -- --open

Deploying

The easiest way to deploy your app is to link the repo to your Vercel account. Alternatively, you can create a production build locally...

ENABLE_VC_BUILD npm run build

...and deploy the prebuilt app to Vercel:

vc deploy --prebuilt

SvelteKit at the Edge

A SvelteKit app rendered with Edge Functions.

Framework Svelte
Use Case Starter
CSS CSS
Publisher Rich Harris

SvelteKit on the edge

A demo SvelteKit app running on Vercel Edge Functions, which run close to your users to enable dynamic server-side rendering at the speed of static content.

How to enable edge functions in your SvelteKit app deployed to Vercel

While the Vercel Build Output API is in beta, you'll need to add the ENABLE_VC_BUILD environment variable with a value of 1 to your project on vercel.com.

Developing

Once you've created a project and installed dependencies with npm install (or pnpm install or yarn), start a development server:

npm run dev

# or start the server and open the app in a new browser tab
npm run dev -- --open

Deploying

The easiest way to deploy your app is to link the repo to your Vercel account. Alternatively, you can create a production build locally...

ENABLE_VC_BUILD npm run build

...and deploy the prebuilt app to Vercel:

vc deploy --prebuilt

Unleash New Possibilities

Deploy your app on Vercel and unlock its full potential