Archived
1
0

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

View File

@ -1,6 +1,6 @@
{
"name": "@coder/web",
"scripts": {
"build": "../../node_modules/.bin/cross-env UV_THREADPOOL_SIZE=100 node --max-old-space-size=32384 ../../node_modules/webpack/bin/webpack.js --config ./webpack.config.js"
}
"name": "@coder/web",
"scripts": {
"build": "../../node_modules/.bin/cross-env UV_THREADPOOL_SIZE=100 node --max-old-space-size=32384 ../../node_modules/webpack/bin/webpack.js --config ./webpack.config.js"
}
}

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>