-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Custom HTTP status pages (404, 403) have different build output #4418
Comments
Thanks for reporting @cvh23! Double checking if this is special-cased for 404 pages, or if we should properly handle all status codes this way. I'll let @matthewp confirm! |
Just touched base with @matthewp on this, and it sounds like this is intentional. Popular providers like Netlify support Today, you can change Since this is expected behavior, I'll close this issue for now. Feel free to reply with thoughts though |
Thanks for your answer. But build process output is still stating, that Yes, would be good to have a common solution for HTTP status pages, not just 404. |
Ah sorry, I forgot about that misleading console message. I'll reopen to work on a fix 👍 As for the dev server behavior, this is a side effect from Vite I'm afraid. Currently, you're allowed to access files on your file system from the dev server directly (either by their input or output file type), even when a given file won't be on your production build output. This is especially true for SSR, where This is a more long-term fix worth raising with the Vite team. I'll make a note of it! |
What version of
astro
are you using?1.0.6
Are you using an SSR adapter? If so, which one?
none
What package manager are you using?
npm
What operating system are you using?
Mac
Describe the Bug
I have a
404.md
and a403.md
insrc/pages
directory. If I executeastro build
, I get a404.html
but a403/index.html
indist
directory. Althoughastro build
-output says, that a403.html
was generated (which would be the intended behavior):On local development web server
403.md
is actually available under/403.html
.Link to Minimal Reproducible Example
https://stackblitz.com/edit/github-vyyavy-7kwypv
Participation
The text was updated successfully, but these errors were encountered: