mirror of
https://github.com/kremalicious/portfolio.git
synced 2024-12-23 01:29:41 +01:00
Merge pull request #17 from kremalicious/feature/remove-service-worker
Remove service worker properly
This commit is contained in:
commit
17786bbe64
@ -21,7 +21,7 @@
|
|||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"file-saver": "^1.3.8",
|
"file-saver": "^1.3.8",
|
||||||
"gatsby": "^2.0.0-beta.35",
|
"gatsby": "^2.0.0-beta.36",
|
||||||
"gatsby-image": "^2.0.0-beta.6",
|
"gatsby-image": "^2.0.0-beta.6",
|
||||||
"gatsby-plugin-favicon": "github:TuckerWhitehouse/gatsby-plugin-favicon#gatsby-v2",
|
"gatsby-plugin-favicon": "github:TuckerWhitehouse/gatsby-plugin-favicon#gatsby-v2",
|
||||||
"gatsby-plugin-matomo": "^0.4.1",
|
"gatsby-plugin-matomo": "^0.4.1",
|
||||||
@ -30,7 +30,7 @@
|
|||||||
"gatsby-plugin-sass": "next",
|
"gatsby-plugin-sass": "next",
|
||||||
"gatsby-plugin-sharp": "^2.0.0-beta.5",
|
"gatsby-plugin-sharp": "^2.0.0-beta.5",
|
||||||
"gatsby-plugin-sitemap": "next",
|
"gatsby-plugin-sitemap": "next",
|
||||||
"gatsby-source-filesystem": "^2.0.1-beta.4",
|
"gatsby-source-filesystem": "^2.0.1-beta.5",
|
||||||
"gatsby-transformer-json": "next",
|
"gatsby-transformer-json": "next",
|
||||||
"gatsby-transformer-sharp": "next",
|
"gatsby-transformer-sharp": "next",
|
||||||
"gatsby-transformer-yaml": "next",
|
"gatsby-transformer-yaml": "next",
|
||||||
|
14
static/sw.js
Normal file
14
static/sw.js
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
self.addEventListener('install', function() {
|
||||||
|
self.skipWaiting()
|
||||||
|
})
|
||||||
|
|
||||||
|
self.addEventListener('activate', function() {
|
||||||
|
self.registration
|
||||||
|
.unregister()
|
||||||
|
.then(function() {
|
||||||
|
return self.clients.matchAll()
|
||||||
|
})
|
||||||
|
.then(function(clients) {
|
||||||
|
clients.forEach(client => client.navigate(client.url))
|
||||||
|
})
|
||||||
|
})
|
Loading…
Reference in New Issue
Block a user