You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Mar 30, 2022. It is now read-only.
33. add to `next.config.js` to make `service-worker.js` available at the root of project folder
331
+
35. `npm i -P next-offline`
332
+
36. add to `next.config.js` to make `service-worker.js` available at the root of project folder
301
333
```
302
334
const withOffline = require('next-offline');
303
335
//...
@@ -322,7 +354,7 @@ This is an example project setup with NextJs, Typescript, Eslint, Prettier, Jest
322
354
//...
323
355
});
324
356
```
325
-
34. add `<link rel="canonical" href="/{folder}" />` to `<Head />` to force redirected to `/{folder}` and allow scope of service worker works under `/{folder}/` (without [adding `service-worker-allowed` header in repsonse header](https://medium.com/dev-channel/two-http-headers-related-to-service-workers-you-never-may-have-heard-of-c8862f76cc60) to request for greater scope)
357
+
37. add `<link rel="canonical" href="/{folder}" />` to `<Head />` to force redirected to `/{folder}` and allow scope of service worker works under `/{folder}/` (without [adding `service-worker-allowed` header in repsonse header](https://medium.com/dev-channel/two-http-headers-related-to-service-workers-you-never-may-have-heard-of-c8862f76cc60) to request for greater scope)
326
358
```
327
359
<Head>
328
360
<Link href="/" passHref>
@@ -332,8 +364,8 @@ This is an example project setup with NextJs, Typescript, Eslint, Prettier, Jest
0 commit comments