diff --git a/.env.development b/.env.development
index f04f0868..1a5fbda3 100644
--- a/.env.development
+++ b/.env.development
@@ -11,3 +11,12 @@ REACT_APP_WS_SERVER_URL=http://localhost:3002
REACT_APP_PORTAL_URL=
REACT_APP_FIREBASE_CONFIG='{"apiKey":"AIzaSyCMkxA60XIW8KbqMYL7edC4qT5l4qHX2h8","authDomain":"excalidraw-oss-dev.firebaseapp.com","projectId":"excalidraw-oss-dev","storageBucket":"excalidraw-oss-dev.appspot.com","messagingSenderId":"664559512677","appId":"1:664559512677:web:a385181f2928d328a7aa8c"}'
+
+# put these in your .env.local, or make sure you don't commit!
+# must be lowercase `true` when turned on
+#
+# whether to enable Service Workers in development
+REACT_APP_DEV_ENABLE_SW=
+# whether to disable live reload / HMR. Usuaully what you want to do when
+# debugging Service Workers.
+REACT_APP_DEV_DISABLE_LIVE_RELOAD=
diff --git a/package.json b/package.json
index 8f27edb9..e9aed502 100644
--- a/package.json
+++ b/package.json
@@ -94,7 +94,8 @@
"build:app:docker": "REACT_APP_DISABLE_SENTRY=true react-scripts build",
"build:app": "REACT_APP_GIT_SHA=$VERCEL_GIT_COMMIT_SHA react-scripts build",
"build:version": "node ./scripts/build-version.js",
- "build": "yarn build:app && yarn build:version",
+ "build:prebuild": "node ./scripts/prebuild.js",
+ "build": "yarn build:prebuild && yarn build:app && yarn build:version",
"eject": "react-scripts eject",
"fix:code": "yarn test:code --fix",
"fix:other": "yarn prettier --write",
diff --git a/public/index.html b/public/index.html
index 31e4ed56..0c576a29 100644
--- a/public/index.html
+++ b/public/index.html
@@ -98,6 +98,22 @@
/>
+ <% if (process.env.REACT_APP_DEV_DISABLE_LIVE_RELOAD === "true") { %>
+
+ <% } %>