Verified Commit eb1a8db0 authored by Tim Vis茅e's avatar Tim Vis茅e
Browse files

Move service worker to root directory

parent 3efa8403
Pipeline #181876473 passed with stage
in 4 minutes and 59 seconds
......@@ -8,7 +8,7 @@
/public/css
/public/fonts
/public/flags
/public/service-worker.js
/public/sw.js
/public/workbox*.js
#################
......
......@@ -8,7 +8,7 @@ var pwaDeferredPrompt = null;
// Register service worker for PWA/offline usage
if('serviceWorker' in navigator) {
window.addEventListener('load', () => {
navigator.serviceWorker.register('/js/sw.js').then(registration => {
navigator.serviceWorker.register('/sw.js').then(registration => {
console.log('Service worker registered: ', registration);
}).catch(registrationError => {
console.log('Service worker registration failed: ', registrationError);
......
......@@ -15,7 +15,7 @@ mix.webpackConfig({
exclude: [
/.*\.(js|css)/
],
swDest: 'js/sw.js',
swDest: 'sw.js',
}),
]
});
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment