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 = [
|
||||
'/'
|
||||
];
|
||||
@ -14,16 +14,7 @@ self.addEventListener('install', function(event) {
|
||||
});
|
||||
|
||||
self.addEventListener('fetch', (event) => {
|
||||
event.respondWith(
|
||||
caches.match(event.request)
|
||||
.then((response) => {
|
||||
return fetch(event.request).then((response) => {
|
||||
//Dev service worker, just return reponse
|
||||
return response;
|
||||
}
|
||||
);
|
||||
})
|
||||
);
|
||||
//never cache data will be stored in dev mode
|
||||
});
|
||||
|
||||
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 = [
|
||||
'/'
|
||||
];
|
||||
|
@ -201,7 +201,7 @@ module.exports = {
|
||||
MAX_USERNAME_LENGTH: 8,
|
||||
MAX_PER_GROUP: 4,
|
||||
DISPLAY_TERMS_OF_USE: false,
|
||||
NODE_ENV: "development",
|
||||
NODE_ENV: mode,
|
||||
}),
|
||||
],
|
||||
} as Configuration & WebpackDevServer.Configuration;
|
||||
|
Loading…
Reference in New Issue
Block a user