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", "name": "Gaben Paradise",
"short_name": "Gaben Paradise", "short_name": "Gaben Paradise",
"theme_color": "#24ACF2", "theme_color": "#0a0a0a",
"icons": [ "icons": [
{ {
"src": "./img/icons/android-chrome-192x192.png", "src": "./img/icons/android-chrome-192x192.png",

View File

@ -49,7 +49,11 @@ if (process.env.NODE_ENV === "production") {
}, },
updated() { updated() {
console.log("New content is available; please refresh."); 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() { offline() {
console.log( console.log(

View File

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

View File

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