vite-plugin-pwa: enable dev sw for not production

This commit is contained in:
thislight 2024-10-24 16:00:19 +08:00
parent e08c978b10
commit 8d9e4b1c48
No known key found for this signature in database
GPG key ID: A50F9451AC56A63E

View file

@ -64,7 +64,7 @@ export default defineConfig(({ mode }) => ({
strategies: "injectManifest", strategies: "injectManifest",
registerType: "autoUpdate", registerType: "autoUpdate",
devOptions: { devOptions: {
enabled: mode === "staging" || mode === "dev", enabled: mode !== "production",
}, },
srcDir: "src/serviceworker", srcDir: "src/serviceworker",
filename: "main.ts", filename: "main.ts",