Skip to content

Commit

Permalink
Disable remote PWA config on CI
Browse files Browse the repository at this point in the history
  • Loading branch information
hvangeffen committed Sep 20, 2024
1 parent 626fecf commit aaef16a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand Down

0 comments on commit aaef16a

Please sign in to comment.