From 20d7243af9bc3dc70e8df40455dcd1d0275fe115 Mon Sep 17 00:00:00 2001 From: lilnasy <69170106+lilnasy@users.noreply.github.com> Date: Wed, 3 Jan 2024 16:51:17 +0000 Subject: [PATCH] include only when 404.astro exists --- packages/integrations/vercel/src/static/adapter.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/integrations/vercel/src/static/adapter.ts b/packages/integrations/vercel/src/static/adapter.ts index 93e3bf4b2fac..c3ca9ef1157f 100644 --- a/packages/integrations/vercel/src/static/adapter.ts +++ b/packages/integrations/vercel/src/static/adapter.ts @@ -118,11 +118,11 @@ export default function vercelStatic({ continue: true, }, { handle: 'filesystem' }, - { - src: `/*`, + ...routes.find(route => route.component.endsWith("/pages/404.astro")) ? [{ + src: `/.*`, dest: `/404.html`, status: 404, - } + }] : [], ], ...(imageService || imagesConfig ? {