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:
BIN
packages/web/assets/logo.png
Normal file
BIN
packages/web/assets/logo.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 28 KiB |
@ -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"
|
||||
}
|
||||
}
|
||||
|
@ -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>
|
Reference in New Issue
Block a user