|
439 | 439 | };
|
440 | 440 |
|
441 | 441 | module.exports = () =>
|
442 | | - withPWA({ |
443 | | - // ... |
444 | | -
|
445 | | - pwa: { |
446 | | - disable: !isProd, |
447 | | - subdomainPrefix: proces.env.LINK_PREFIX, |
448 | | - dest: 'public', |
449 | | - navigationPreload: true, |
450 | | - }, |
451 | | - }); |
| 442 | + withManifest( |
| 443 | + withPWA({ |
| 444 | + // ... |
| 445 | +
|
| 446 | + // service worker |
| 447 | + pwa: { |
| 448 | + disable: !isProd, |
| 449 | + subdomainPrefix: proces.env.LINK_PREFIX, |
| 450 | + dest: 'public', |
| 451 | + navigationPreload: true, |
| 452 | + }, |
| 453 | +
|
| 454 | +
|
| 455 | + // manifest |
| 456 | + manifest: { |
| 457 | + /* eslint-disable @typescript-eslint/camelcase */ |
| 458 | + output: 'public', |
| 459 | + short_name: FOLDER, |
| 460 | + name: FOLDER, |
| 461 | + start_url: `${LINK_PREFIX}/`, |
| 462 | + background_color: THEME_COLOR, |
| 463 | + display: 'standalone', |
| 464 | + scope: `${LINK_PREFIX}/`, |
| 465 | + dir: 'ltr', // text direction: left to right |
| 466 | + theme_color: THEME_COLOR, |
| 467 | + icons: [ |
| 468 | + { |
| 469 | + src: `${LINK_PREFIX}${ICON_192_PATH}`, |
| 470 | + sizes: '192x192', |
| 471 | + type: 'image/png', |
| 472 | + }, |
| 473 | + { |
| 474 | + src: `${LINK_PREFIX}${ICON_512_PATH}`, |
| 475 | + sizes: '512x512', |
| 476 | + type: 'image/png', |
| 477 | + }, |
| 478 | + ], |
| 479 | + }, |
| 480 | + }) |
| 481 | + ); |
452 | 482 | ```
|
453 | | -3. add `public/manifest.json` similar to the one in the example setup |
454 | | -4. add `public/icons` folder and include corresponding icon files in the folder |
455 | | -5. copy `ManifestHead.tsx` from the example setup `src/features/head` |
456 | | -6. import `ManifestHead` in pages |
| 483 | +3. add `public/icons` folder and include corresponding icon files in the folder |
| 484 | +4. copy `ManifestHead.tsx` from the example setup `src/features/head` |
| 485 | +5. import `ManifestHead` in pages |
457 | 486 |
|
458 | 487 | ### [Typeorm and Sql.js](https://typeorm.io/#/)
|
459 | 488 | 1.
|
|
0 commit comments