Skip to content

@astrojs/vercel with edge function target doesn't render 404.astro page #7735

@susickypavel

Description

@susickypavel

What version of astro are you using?

2.9.0

Are you using an SSR adapter? If so, which one?

Vercel

What package manager are you using?

pnpm

What operating system are you using?

Mac, Windows

What browser are you using?

Chrome, Firefox, Safari

Describe the Bug

Deployed app: https://astro-vercel-404-edge-bug.vercel.app/
Code: https://stackblitz.com/edit/github-z7x12r?file=src%2Fpages%2F404.astro

Astro website deployed on Vercel using edge adapter doesn't recognize 404.astro page and browser native 404 page is shown instead.

It works in development, it doesn't work on Vercel only. It doesn't matter whether the 404.astro is prerendered or not.

What's the expected result?

Navigating to a page that doesn't exist shows the content of 404.astro.

Link to Minimal Reproducible Example

https://stackblitz.com/edit/github-z7x12r?file=src%2Fpages%2F404.astro

Participation

  • I am willing to submit a pull request for this issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    - P4: importantViolate documented behavior or significantly impacts performance (priority)feat: ssrRelated to SSR (scope)pkg: vercelRelated to Vercel adapter (scope)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions