ISR(Incremental Static Regeneration) feature not generating dynamic pages in s3 bucket
See original GitHub issuepages are generated in s3 on this folder[static-pages/{**}.html and _next/data/{id}/*.json] build time only
when I open url like page/3 in my browser it’s always show me loading state then comes up main content and this page is not being generated in s3
function Post({ post }) {
const router = useRouter()
if (router.isFallback) {
return <div>Loading...</div>
}
// Render post...
}
// This function gets called at build time
export async function getStaticPaths() {
return {
// Only `/posts/1` and `/posts/2` are generated at build time
paths: [{ params: { id: '1' } }, { params: { id: '2' } }],
// Enable statically generating additional pages
// For example: `/posts/3`
fallback: true,
}
}
// This also gets called at build time
export async function getStaticProps({ params }) {
const res = await fetch(`https://.../posts/${params.id}`)
const post = await res.json()
return {
props: { post },
revalidate: 5,
}
}
export default Post
Issue Analytics
- State:
- Created 2 years ago
- Comments:24
Top Results From Across the Web
A Complete Guide To Incremental Static Regeneration (ISR ...
Below you'll find a guide to ISR — including use cases, demos and tradeoffs. The Problem with Static-Site Generation #. The idea behind...
Read more >Incremental Static Regeneration - Data Fetching - Next.js
Learn how to create or update static pages at runtime with Incremental Static Regeneration. ... Incremental Static Regeneration (ISR) enables you to use ......
Read more >NextJS Incremental Static Generation and Regeneration ...
Incremental Static Regeneration brings the best of Static Site Generation (SSG) and Server Side Rendering (SSR) to NextJS. The feature ...
Read more >Incremental Static Regeneration – Vercel Docs
Incremental Static Regeneration (ISR) allows you to create or update content without redeploying your site. ISR has three main benefits for developers: ...
Read more >Deploying nextjs app as an SPA? : r/reactjs - Reddit
Incremental Static Regeneration (ISR)? Update static page after ... How do I deploy next.js app as an SPA on Cloudfront CDN + S3...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@adamelmore great! That definitely sounds like a good incentive! I would do myself but unfortunately don’t have enough time to take it on yet until I finish existing bugs / releasing 1.19 (I don’t really need the financial incentive myself). But if someone is interested they can start on it and join our Slack. I agree it is an important feature in Next.js but I think it definitely requires several days work to make sure it is well tested.
I will probably try to put that in one of the pinned issues for more visibility.
Hi @ignaciolarranaga, this will be fixed in #1028, although you can solve right now using something like: