From 7c5c12178d0a9157f71432671ab6efadaa58d818 Mon Sep 17 00:00:00 2001 From: Jeremy Kahn Date: Wed, 13 Mar 2024 07:27:21 -0500 Subject: [PATCH] fix(pwa): use compatible service worker name This restores backwards compatibility with create-react-app-based builds --- .github/workflows/deploy.yml | 6 ------ vite.config.ts | 1 + 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 5279eb3..4dc1aa4 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -24,12 +24,6 @@ jobs: run: | npm ci npm run build - # NOTE: This is a compatibility shim needed for upgrading installed - # Chitchatter PWAs after the switch to Vite: - # https://github.com/jeremyckahn/chitchatter/commit/ea34058fa7ac2cbfd165837cdbef5caf6a9645ce#diff-639916bc14c3f311c31f629a2ec116292a4b2f64d06b3607b9ddd2e495703895 - # - # TODO: Remove this cp operation after 9/1/2023. - cp dist/manifest.webmanifest dist/manifest.json - name: Deploy uses: peaceiris/actions-gh-pages@v3 diff --git a/vite.config.ts b/vite.config.ts index d6621d3..eac8490 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -58,6 +58,7 @@ const config = () => { enabled: false, }, injectRegister: 'auto', + filename: 'service-worker.js', manifest, }), ],