mirror of
https://github.com/hanzoai/next.js.git
synced 2026-09-24 17:00:51 +00:00
The problem is that the adapter expected a `output.pages` for the `/404` route so that it can add these files to other Pages handlers so that they can render a 404 at runtime (getStaticProps with revaliate/getServerSideProps): https://github.com/nextjs/adapter-vercel/blob/650effd340b4f676a9bca6e0cdaba9bf7d34595a/packages/adapter/src/outputs.ts#L421-L438 https://github.com/nextjs/adapter-vercel/blob/650effd340b4f676a9bca6e0cdaba9bf7d34595a/packages/adapter/src/node-handler.ts#L331-L340 But this 404 Pages handler was not actually emitted if it was prerendered, where it only emitted the `/404.html` static file. But that's not what the adapter needs. Tests: 1. Run as an e2e test 2. Add a variant with dynamically rendered 404 pages Full e2e test run: ~~https://github.com/vercel/next.js/actions/runs/29081105397~~ https://github.com/vercel/next.js/actions/runs/29087851475 Closes NEXT-4947
8 lines
101 B
JavaScript
8 lines
101 B
JavaScript
export default function Page(props) {
|
|
return (
|
|
<>
|
|
<h1>Custom 404 page</h1>
|
|
</>
|
|
)
|
|
}
|