Added service worker back to the project to recover PWA capabilities

This commit is contained in:
Alejandro Celaya
2021-06-06 12:26:43 +02:00
parent d5530b4614
commit 2fb5507803
6 changed files with 278 additions and 77 deletions

View File

@@ -5,6 +5,7 @@ import { homepage } from '../package.json';
import container from './container';
import store from './container/store';
import { fixLeafletIcons } from './utils/helpers/leaflet';
import * as serviceWorkerRegistration from './serviceWorkerRegistration';
import 'react-datepicker/dist/react-datepicker.css';
import 'leaflet/dist/leaflet.css';
import './index.scss';
@@ -26,3 +27,8 @@ render(
</Provider>,
document.getElementById('root'),
);
// If you want your app to work offline and load faster, you can change
// unregister() to register() below. Note this comes with some pitfalls.
// Learn more about service workers: https://cra.link/PWA
serviceWorkerRegistration.register();