rsnext/test/integration/not-found-revalidate/pages/404.js
JJ Kasper 169785253e
Fix revalidate for initial notFound: true paths (#28097)
This fixes revalidation not occurring correctly when `notFound: true` is returned during build, additional tests have been added to ensure this is working correctly for dynamic and non-dynamic pages returning `notFound: true` during build and then revalidating afterwards.  

## Bug

- [x] Related issues linked using `fixes #number`
- [x] Integration tests added
- [x] Errors have helpful link attached, see `contributing.md`

Fixes: https://github.com/vercel/next.js/issues/21453
2021-08-14 13:11:40 +00:00

19 lines
337 B
JavaScript

export default function Page(props) {
return (
<>
<p id="not-found">404 page</p>
<p id="props">{JSON.stringify(props)}</p>
</>
)
}
export const getStaticProps = () => {
console.log('404 getStaticProps')
return {
props: {
notFound: true,
random: Math.random(),
},
revalidate: 1,
}
}