#How can I build my app without pre-rendering pages? (app router)

9 messages · Page 1 of 1 (latest)

warped cargo
#

I would like to create my app build it fails to build if my API is not running. Is that because Next.js by default tries to prerender the initial page? How can I opt out so that each request is fresh (nothing prerendered)? Or thats not recommended and I am missing something ... I am using Next 14 with App router.

torn kernelBOT
#

🔎 This post has been indexed in our web forum and will be seen by search engines so other users can find it outside Discord

🕵️ Your user profile is private by default and won't be visible to users outside Discord, if you want to be visible in the web forum you can add the "Public Profile" role in id:customize

✅ You can mark a message as the answer for your post with Right click -> Apps -> Mark Solution
(if you don't see the option, try refreshing Discord with Ctrl + R)

granite plaza
warped cargo
#

@granite plaza thanks for quick answer. I am using external API rather than next api routes, does it make any difference?

granite plaza
warped cargo
#

yeah, that's probably the way to go. Thanks!

#

@granite plaza just out of curiosity what is the reason for failing to build? Is this because next.js is trying to prerender the page for the faster initial load?

granite plaza
warped cargo
#

thanks for the answer. Then if data has changed since the build would they still get the static rendered page? or next js is smart enough to check that data has changed and will server updated one?