Improve service worker store managment
Signed-off-by: Gregoire Parant <g.parant@thecodingmachine.com>
This commit is contained in:
parent
bced495570
commit
434b112c65
13
front/dist/service-worker-dev.js
vendored
13
front/dist/service-worker-dev.js
vendored
@ -1,4 +1,4 @@
|
|||||||
let CACHE_NAME = 'workavdenture-cache-v1';
|
let CACHE_NAME = 'workavdenture-cache-dev';
|
||||||
let urlsToCache = [
|
let urlsToCache = [
|
||||||
'/'
|
'/'
|
||||||
];
|
];
|
||||||
@ -14,16 +14,7 @@ self.addEventListener('install', function(event) {
|
|||||||
});
|
});
|
||||||
|
|
||||||
self.addEventListener('fetch', (event) => {
|
self.addEventListener('fetch', (event) => {
|
||||||
event.respondWith(
|
//never cache data will be stored in dev mode
|
||||||
caches.match(event.request)
|
|
||||||
.then((response) => {
|
|
||||||
return fetch(event.request).then((response) => {
|
|
||||||
//Dev service worker, just return reponse
|
|
||||||
return response;
|
|
||||||
}
|
|
||||||
);
|
|
||||||
})
|
|
||||||
);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
self.addEventListener('wait', function(event) {
|
self.addEventListener('wait', function(event) {
|
||||||
|
2
front/dist/service-worker-prod.js
vendored
2
front/dist/service-worker-prod.js
vendored
@ -1,4 +1,4 @@
|
|||||||
let CACHE_NAME = 'workavdenture-cache-v1';
|
let CACHE_NAME = 'workavdenture-cache-v1.2';
|
||||||
let urlsToCache = [
|
let urlsToCache = [
|
||||||
'/'
|
'/'
|
||||||
];
|
];
|
||||||
|
@ -201,7 +201,7 @@ module.exports = {
|
|||||||
MAX_USERNAME_LENGTH: 8,
|
MAX_USERNAME_LENGTH: 8,
|
||||||
MAX_PER_GROUP: 4,
|
MAX_PER_GROUP: 4,
|
||||||
DISPLAY_TERMS_OF_USE: false,
|
DISPLAY_TERMS_OF_USE: false,
|
||||||
NODE_ENV: "development",
|
NODE_ENV: mode,
|
||||||
}),
|
}),
|
||||||
],
|
],
|
||||||
} as Configuration & WebpackDevServer.Configuration;
|
} as Configuration & WebpackDevServer.Configuration;
|
||||||
|
Loading…
Reference in New Issue
Block a user