From acdd3487eda889e984bcf6d8909bee1cb9bb90de Mon Sep 17 00:00:00 2001 From: Ian Sutherland Date: Tue, 16 Jan 2018 10:57:00 -0700 Subject: [PATCH] WIP disable service worker by default (#2554) --- packages/react-scripts/template/src/index.js | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/packages/react-scripts/template/src/index.js b/packages/react-scripts/template/src/index.js index fae3e3500cf..ec5099512e9 100644 --- a/packages/react-scripts/template/src/index.js +++ b/packages/react-scripts/template/src/index.js @@ -2,7 +2,16 @@ import React from 'react'; import ReactDOM from 'react-dom'; import './index.css'; import App from './App'; -import registerServiceWorker from './registerServiceWorker'; +import registerServiceWorker, { + unregister as unregisterServiceWorker, +} from './registerServiceWorker'; ReactDOM.render(, document.getElementById('root')); -registerServiceWorker(); + +// By default we make sure that no service worker is registered. If you would +// like to enable service worker uncomment the call to registerServiceWorker() +// and comment out the call to unregisterServiceWorker(). +// See http://bit.ly/2vJdu84 for more information. + +// registerServiceWorker(); +unregisterServiceWorker();