Open5
vite-plugin-pwa を試す

このスクラップについて

プロジェクト作成
コマンド
cd ~/workspace
npm create @vite-pwa/pwa@latest hello-vite-pwa
cd hello-vite-pwa
npm install
npm run dev
プロンプト
✔ Select a framework: › React
✔ Select a variant: › TypeScript
✔ PWA Name: … hello-vite-pwa
✔ PWA Short Name: … hello-vite-pwa
✔ PWA Description: …
✔ Theme color: … #ffffff
✔ Select a strategy: › generateSW
✔ Select a behavior: › Prompt for update
✔ Enable periodic SW updates? … no / yes
✔ Show offline ready prompt? … no / yes
✔ Generate PWA Assets Icons on the fly? … no / yes

直後の様子
Service Worker が登録されないようだ。

Remix も試してみる
プロンプト
✔ Select a framework: › React
✔ Select a variant: › Remix ↗
✔ PWA Name: … hello-vite-pwa
✔ PWA Short Name: … hello-vite-pwa
✔ PWA Description: …
✔ Theme color: … #ffffff
✔ Select a strategy: › generateSW
✔ Select a behavior: › Prompt for update
✔ Enable periodic SW updates? … no / yes
✔ Show offline ready prompt? … no / yes
✔ Generate PWA Assets Icons on the fly? … no / yes

開発時
もしかすると開発時は反映されないのかも知れない。