service-worker: replace matcher with regexp
This commit is contained in:
parent
cedea10594
commit
678b55ecdf
File diff suppressed because one or more lines are too long
@ -13,10 +13,8 @@ self.addEventListener('install', () => {
|
|||||||
|
|
||||||
clientsClaim();
|
clientsClaim();
|
||||||
|
|
||||||
const routes = ['/', '/unlimited'];
|
|
||||||
|
|
||||||
registerRoute(
|
registerRoute(
|
||||||
({ url }) => routes.includes(url.pathname),
|
/\/(unlimited)?$/u,
|
||||||
new CacheFirst({
|
new CacheFirst({
|
||||||
cacheName,
|
cacheName,
|
||||||
plugins: [
|
plugins: [
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user