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 ? {