Modified src/index.js to only register a service worker if process.env.SERVICE_WORKER_FILE_NAME is truthy.
Modified webpack.config.js to set process.env.SERVICE_WORKER_FILE_NAME to false in development mode, unless the special ENABLE_SERVICE_WORKER_DEBUGGING env var is truthy.
Now, service workers are only generated OR requested:
in production
when they are directly under development, indicated by the env var ENABLE_SERVICE_WORKER_DEBUGGING.
Modified
src/index.js
to only register a service worker ifprocess.env.SERVICE_WORKER_FILE_NAME
is truthy.Modified
webpack.config.js
to setprocess.env.SERVICE_WORKER_FILE_NAME
tofalse
in development mode, unless the specialENABLE_SERVICE_WORKER_DEBUGGING
env var is truthy.Now, service workers are only generated OR requested:
ENABLE_SERVICE_WORKER_DEBUGGING
.Fixes #64.