diff --git a/config/feature-flags.ts b/config/feature-flags.ts index 79609ff132..1949138256 100644 --- a/config/feature-flags.ts +++ b/config/feature-flags.ts @@ -13,6 +13,8 @@ export function makeFeatureFlags(env: { pr: boolean; }) { return { + // Whether to install a service worker + serviceWorker: !env.dev && !env.pr, // Print debug info to console about item moves debugMoves: !env.release, // Debug Service Worker diff --git a/src/Index.tsx b/src/Index.tsx index 3ebccbe113..446d5b22a2 100644 --- a/src/Index.tsx +++ b/src/Index.tsx @@ -32,7 +32,7 @@ infoLog( initGoogleAnalytics(); safariTouchFix(); -if ($DIM_FLAVOR !== 'dev') { +if ($featureFlags.serviceWorker) { registerServiceWorker(); }