|
420 | 420 | ### [PWA](https://github.com/shadowwalker/next-pwa#readme) |
421 | 421 | 1. |
422 | 422 | ```sh |
423 | | - npm i -S next-pwa |
| 423 | + npm i -S next-pwa next-manifest |
424 | 424 | ``` |
425 | 425 | 2. change`next.config.js` |
426 | 426 | ```js |
|
441 | 441 | withPWA({ |
442 | 442 | // ... |
443 | 443 |
|
| 444 | + // service worker |
444 | 445 | pwa: { |
445 | 446 | disable: !isProd, |
446 | 447 | subdomainPrefix: proces.env.LINK_PREFIX, |
|
477 | 478 | }) |
478 | 479 | ); |
479 | 480 | ``` |
480 | | -4. add `public/icons` folder and include corresponding icon files in the folder |
481 | | -5. copy `ManifestHead.tsx` from the example setup `src/features/head` |
482 | | -6. import `ManifestHead` in pages |
| 481 | +3. add `public/icons` folder and include corresponding icon files in the folder |
| 482 | +4. copy `ManifestHead.tsx` from the example setup `src/features/head` |
| 483 | +5. import `ManifestHead` in pages |
483 | 484 |
|
484 | 485 | ### Notes: |
485 | 486 | 1. NextJs, next-pwa, workbox are still growing their api, so this project setup will be modified in the future for easier setup. |
|