From 067a363550c5a0d29d266d88ccb45d0f368d7321 Mon Sep 17 00:00:00 2001 From: thislight Date: Tue, 23 Jul 2024 14:16:35 +0800 Subject: [PATCH] configure local debugging options --- vite.config.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/vite.config.ts b/vite.config.ts index 26d01b6..7ebb905 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -17,9 +17,20 @@ export default defineConfig(({ mode }) => ({ }), VitePWA({ registerType: "autoUpdate", + devOptions: { + enabled: mode === "staging", + }, }), version(), ], + server: { + https: { + // localhost.direct: https://github.com/Upinel/localhost.direct + key: "tools/certs/localhost.direct.key", + cert: "tools/certs/localhost.direct.crt", + passphrase: "localhost", + }, + }, define: { "import.meta.env.BUILT_AT": `"${new Date().toISOString()}"`, },