Add offline clip caching
This commit is contained in:
@@ -12,6 +12,24 @@ export default defineConfig(({ mode }) => {
|
||||
VitePWA({
|
||||
registerType: "autoUpdate",
|
||||
includeAssets: ["icon.svg"],
|
||||
workbox: {
|
||||
runtimeCaching: [
|
||||
{
|
||||
urlPattern: ({ url }) => url.pathname.startsWith("/api/media/files/"),
|
||||
handler: "CacheFirst",
|
||||
options: {
|
||||
cacheName: "walkup-media",
|
||||
cacheableResponse: {
|
||||
statuses: [200],
|
||||
},
|
||||
expiration: {
|
||||
maxEntries: 200,
|
||||
maxAgeSeconds: 60 * 60 * 24 * 30,
|
||||
},
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
manifest: {
|
||||
name: "Walkup",
|
||||
short_name: "Walkup",
|
||||
|
||||
Reference in New Issue
Block a user