Next.js RSC vs Static Exports Mode Best For PWA? #140
-
Hi, I need to build a offline first PWA. I'd prefer to use Next.js 14 App Router with all it's (server) features, but I'm wondering if it that will make building an offline-first / PWA difficult. Should I resort to using Next.js static exports mode? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 9 replies
-
They are not mutually exclusive, fyi. Well, if you keep your pages dynamically generated, just don't precache them and you should be fine :) |
Beta Was this translation helpful? Give feedback.
-
I build a PWA with NextJS 14 without issues.
… On 11 May 2024, at 12:26 AM, Ben Stickley ***@***.***> wrote:
Hi, I need to build a offline first PWA. I'd prefer to use Next.js 14 App Router with all it's (server) features, but I'm wondering if it that will make building an offline-first / PWA difficult. Should I resort to using Next.js static exports mode?
—
Reply to this email directly, view it on GitHub <#140>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AATMOLC4AZ52QG5WBTBDPGDZBTYJZAVCNFSM6AAAAABHQ44ZRGVHI2DSMVQWIX3LMV43ERDJONRXK43TNFXW4OZWGY2DEMJXGQ>.
You are receiving this because you are subscribed to this thread.
|
Beta Was this translation helpful? Give feedback.
@bestickley
They are not mutually exclusive, fyi.
Well, if you keep your pages dynamically generated, just don't precache them and you should be fine :)
@serwist/next
serves them with theNetworkFirst
strategy out of the box. If you want to go down the offline-first route, it's recommended that you statically generate your application and keep dynamic content on the client (I'm not sure about PPR, please do your research on how it works, thanks!). To precache the pages, use theadditionalPrecacheEntries
option.