SvelteKit Deployment Configuration
SvelteKit apps can now control their deployment configuration on a per-route basis. This means we can render some routes with Edge Functions, some with Serverless Functions, and others with Incremental Static Regeneration. If no configuration is specified, it will use the project defaults.
To specify the deployment configuration of this endpoint to be edge, add the following code to your +page.js file:
export const config = {
runtime: 'edge'
};
To specify the deployment configuration of this endpoint to be ISR, add the following code to your +page.js file. Here, expiration (in seconds) is the time before the cached asset will be re-generated by invoking the Serverless Function.
export const config = {
isr: {
expiration: 10
};
};
Svelte logo
Built with SvelteKit