From 4075c4194291e9126528cb22b9625cca42af882d Mon Sep 17 00:00:00 2001 From: thislight Date: Thu, 24 Oct 2024 23:50:57 +0800 Subject: [PATCH] vite-plugin-pwa: enable production sw for staging --- vite.config.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vite.config.ts b/vite.config.ts index 5fdb81c..466d139 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -64,7 +64,7 @@ export default defineConfig(({ mode }) => ({ strategies: "injectManifest", registerType: "autoUpdate", devOptions: { - enabled: mode !== "production", + enabled: !["production", "staging"].includes(mode), }, srcDir: "src/serviceworker", filename: "main.ts",