This example demonstrates how to add some custom worker code to the generated service worker.
cd examples/custom-worker
pnpm build
pnpm start
or
Execute create-next-app
with npm, Yarn, or pnpm to bootstrap the example:
npx create-next-app --example https://github.com/DuCanhGH/next-pwa/tree/master/examples/custom-worker custom-worker-app
yarn create next-app --example https://github.com/DuCanhGH/next-pwa/tree/master/examples/custom-worker custom-worker-app
pnpm create next-app --example https://github.com/DuCanhGH/next-pwa/tree/master/examples/custom-worker custom-worker-app
**/public/workbox-*.js
**/public/sw.js
**/public/worker-*.js