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