mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-04-14 16:40:58 -04:00
fix: fonts not cached by service worker (#2338)
This commit is contained in:
parent
dcedd17f57
commit
2a20c44338
1 changed files with 9 additions and 0 deletions
|
@ -36,3 +36,12 @@ workbox.routing.registerNavigationRoute(
|
|||
blacklist: [/^\/_/, /\/[^/?]+\.[^/]+$/],
|
||||
},
|
||||
);
|
||||
|
||||
// Cache relevant font files
|
||||
workbox.routing.registerRoute(
|
||||
new RegExp("/(fonts.css|.+.(ttf|woff2|otf))"),
|
||||
new workbox.strategies.StaleWhileRevalidate({
|
||||
cacheName: "fonts",
|
||||
plugins: [new workbox.expiration.Plugin({ maxEntries: 10 })],
|
||||
}),
|
||||
);
|
||||
|
|
Loading…
Add table
Reference in a new issue