adding section to the runtimeCaching in the vite config that will force api calls to use the network rather than any cached responses
This commit is contained in:
parent
982fdf85a4
commit
8dfe72e41c
1 changed files with 8 additions and 0 deletions
|
|
@ -34,6 +34,14 @@ export default defineConfig({
|
||||||
cacheName: 'assets-cache',
|
cacheName: 'assets-cache',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
//this forces all api calls to go through the network
|
||||||
|
urlPattern: ({ url }) => url.pathname.startsWith('/v1/'),
|
||||||
|
handler: 'NetworkOnly',
|
||||||
|
options: {
|
||||||
|
cacheName: 'api-cache',
|
||||||
|
},
|
||||||
|
},
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
}),
|
}),
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue