Skip to content
Discussion options

You must be logged in to vote

Based on this discussion, I found a solution to my case, but it needed some improvement.
my code here
https://github.com/TarekAbdelfatah/Pwa-Offline-first-Nextjs-dynamicRoutes.git

First, you should make your application a PWA and use Serwist:

My setup is as follows:

next.config.ts

import withSerwistInit from '@serwist/next';

const withSerwist = withSerwistInit({
  swSrc: 'src/app/sw.ts',
   
  swDest: "public/sw.js",
  cacheOnNavigation: true,
  additionalPrecacheEntries: [{ url: "/offline", revision: '11' },
    { url: "/offlinedoc", revision: '12' }],
});

export d…

Replies: 4 comments 3 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@TarekAbdelfatah
Comment options

Comment options

You must be logged in to vote
1 reply
@TarekAbdelfatah
Comment options

Comment options

You must be logged in to vote
1 reply
@icyJoseph
Comment options

Answer selected by TarekAbdelfatah
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants