From aaef16a77b1b45e3cb330d06f21330c269b7d825 Mon Sep 17 00:00:00 2001 From: hvangeffen Date: Fri, 20 Sep 2024 10:58:29 +0200 Subject: [PATCH] Disable remote PWA config on CI --- vite.config.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vite.config.ts b/vite.config.ts index 58ab84647..395ed6074 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -15,7 +15,10 @@ const __dirname = path.dirname(__filename) // https://vitejs.dev/config/ export default defineConfig(async ({ mode, command }) => { const env = loadEnv(mode, process.cwd(), '') - const VitePWAPlugin = await getVitePWAPlugin(env, command === 'build') + const isCI = !!process.env.CI + + const useRemoteConfig = command === 'build' && !isCI + const VitePWAPlugin = await getVitePWAPlugin(env, useRemoteConfig) return { define: {