Added serviceworker and web-manifest (#154)

* Added serviceworker and manifest.json

* added deps in package.json

* fixed image link

* actually fixed images i think

* added assets to individual module folders

* added caching

* Serviceworker now properly loads

* Changed single to double quotes

* Update lock

* moved the service worker back into prod only

* removed sw from general

* changed background color of splash screen

* added logo to server

* centralized logo into single assets folder
This commit is contained in:
Luca Casonato
2019-04-16 22:44:57 +02:00
committed by Asher
parent b8f222acf2
commit 22b485acd9
6 changed files with 676 additions and 77 deletions

View File

@@ -23,8 +23,15 @@
return;
}
document.body.style.background = bg;
})();
})();
// Check that service workers are registered
if ("serviceWorker" in navigator) {
// Use the window load event to keep the page load performant
window.addEventListener("load", () => {
navigator.serviceWorker.register("/service-worker.js");
});
}
</script>
</body>
</html>