1
0
Fork 0
mirror of https://github.com/betagouv/mon-entreprise synced 2025-02-08 21:05:01 +00:00

Unregister les service worker précédents

This commit is contained in:
Johan Girod 2021-03-23 10:09:10 +01:00
parent f377d8c2f7
commit 14f33430af
4 changed files with 19 additions and 10 deletions

View file

@ -1,13 +1,14 @@
import 'core-js/stable'
import { hot } from 'react-hot-loader/root'
import { render } from 'react-dom'
import 'regenerator-runtime/runtime'
import rules from 'modele-social'
import { render } from 'react-dom'
import { hot } from 'react-hot-loader/root'
import 'regenerator-runtime/runtime'
import '../../removeServiceWorker'
import App from './App'
import i18next from './locales/i18n'
import translations from './locales/ui-en.yaml'
import ruleTranslations from './locales/rules-en.yaml'
import translateRules from './locales/translateRules'
import App from './App'
import translations from './locales/ui-en.yaml'
i18next.addResourceBundle('en', 'translation', translations)
i18next.changeLanguage('en')

View file

@ -1,9 +1,10 @@
import { hot } from 'react-hot-loader/root'
import 'core-js/stable'
import 'react-hot-loader'
import { render } from 'react-dom'
import 'regenerator-runtime/runtime'
import rules from 'modele-social'
import { render } from 'react-dom'
import 'react-hot-loader'
import { hot } from 'react-hot-loader/root'
import 'regenerator-runtime/runtime'
import '../../removeServiceWorker'
import App from './App'
import i18next from './locales/i18n'

View file

@ -1,9 +1,9 @@
// TODO: The webpack configuration of the publi.codes site remains in the
// mon-entreprise.fr and should be dissociated.
import 'core-js/stable'
import { render } from 'react-dom'
import 'regenerator-runtime/runtime'
import '../../removeServiceWorker'
import App from './components/App'
const anchor = document.querySelector('#js')

7
removeServiceWorker.js Normal file
View file

@ -0,0 +1,7 @@
if (navigator.serviceWorker) {
navigator.serviceWorker.getRegistrations().then(function (registrations) {
for (let registration of registrations) {
registration.unregister()
}
})
}