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();
|
||||
|
||||
const routes = ['/', '/unlimited'];
|
||||
|
||||
registerRoute(
|
||||
({ url }) => routes.includes(url.pathname),
|
||||
/\/(unlimited)?$/u,
|
||||
new CacheFirst({
|
||||
cacheName,
|
||||
plugins: [
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user