From 9eeabfcca5379b4dff989105ff815e9143cc63bb Mon Sep 17 00:00:00 2001 From: Joel Kuzmarski Date: Tue, 13 Feb 2024 05:02:40 -0600 Subject: [PATCH] Update 90-adapter-vercel.md Make the Vercel images config documentation more noob friendly. --- .../25-build-and-deploy/90-adapter-vercel.md | 20 ++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/documentation/docs/25-build-and-deploy/90-adapter-vercel.md b/documentation/docs/25-build-and-deploy/90-adapter-vercel.md index ae9b91444c6f..ca4f3a558a16 100644 --- a/documentation/docs/25-build-and-deploy/90-adapter-vercel.md +++ b/documentation/docs/25-build-and-deploy/90-adapter-vercel.md @@ -69,11 +69,21 @@ If your functions need to access data in a specific region, it's recommended tha You may set the `images` config to control how Vercel builds your images. See the [image configuration reference](https://vercel.com/docs/build-output-api/v3/configuration#images) for full details. As an example, you may set: ``` -{ - sizes: [640, 828, 1200, 1920, 3840], - formats: ['image/avif', 'image/webp'], - minimumCacheTTL: 300 -} +/// file: svelte.config.js +import adapter from '@sveltejs/adapter-vercel'; + +export default { + kit: { + adapter({ + images: { + sizes: [640, 828, 1200, 1920, 3840], + formats: ['image/avif', 'image/webp'], + minimumCacheTTL: 300, + domains: ['example-app.vercel.app'], + } + }) + } +}; ``` ## Incremental Static Regeneration