fix env mode check when registering sw

This commit is contained in:
Ajay Bura 2024-09-09 14:08:38 +05:30
parent 024c8fad7f
commit 8c5a6f2fd4

View file

@ -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`;