New Release

This commit is contained in:
JonatanRek 2020-08-10 20:04:18 +02:00
parent facb6f4420
commit 5a561d4420
4 changed files with 10 additions and 4 deletions

View File

@ -1,7 +1,7 @@
{
"name": "Gaben Paradise",
"short_name": "Gaben Paradise",
"theme_color": "#24ACF2",
"theme_color": "#0a0a0a",
"icons": [
{
"src": "./img/icons/android-chrome-192x192.png",

View File

@ -49,7 +49,11 @@ if (process.env.NODE_ENV === "production") {
},
updated() {
console.log("New content is available; please refresh.");
//window.location.reload(true);
navigator.serviceWorker.getRegistrations().then(function (registrations) {
for (let registration of registrations) {
registration.update()
}
})
},
offline() {
console.log(

View File

@ -1,11 +1,12 @@
/*self.__precacheManifest = [].concat(self.__precacheManifest || []);*/
self.__precacheManifest = [].concat(self.__precacheManifest || []);
// workbox.setConfig({
// debug: true
// });
//workbox.precaching.precacheAndRoute(self.__precacheManifest, {});
workbox.precaching.precacheAndRoute(self.__precacheManifest, {});
console.log('Loading SW');
self.addEventListener("push", function (event) {
console.log('Received a push message', event);
if (event.data) {

View File

@ -2,6 +2,7 @@ module.exports = {
pwa: {
name: 'Gaben Paradise',
workboxPluginMode: 'InjectManifest',
themeColor: '#0a0a0a',
workboxOptions:{
swSrc: "src/service-worker.js"
},