Skip to content

Commit

Permalink
fix env mode check when registering sw
Browse files Browse the repository at this point in the history
  • Loading branch information
ajbura committed Sep 9, 2024
1 parent 024c8fa commit 8c5a6f2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ settings.applyTheme();
// Register Service Worker
if ('serviceWorker' in navigator) {
const swUrl =
import.meta.env.MODE === 'prod'
import.meta.env.MODE === 'production'
? `${trimTrailingSlash(import.meta.env.BASE_URL)}/sw.js`
: `/dev-sw.js?dev-sw`;

Expand Down

0 comments on commit 8c5a6f2

Please sign in to comment.