mirror of
https://github.com/Spythere/pojazdownik.git
synced 2026-05-03 05:18:10 +00:00
Workbox
This commit is contained in:
+19
-19
@@ -9,25 +9,25 @@ export default defineConfig({
|
|||||||
vue(),
|
vue(),
|
||||||
VitePWA({
|
VitePWA({
|
||||||
registerType: 'autoUpdate',
|
registerType: 'autoUpdate',
|
||||||
workbox: {
|
// workbox: {
|
||||||
globPatterns: ['**/*.{js,css,html,png,svg,img}'],
|
// globPatterns: ['**/*.{js,css,html,png,svg,img}'],
|
||||||
runtimeCaching: [
|
// runtimeCaching: [
|
||||||
{
|
// {
|
||||||
urlPattern: new RegExp(`^https://spythere.github.io/api\/.*`),
|
// urlPattern: new RegExp(`^https://spythere.github.io/api\/.*`),
|
||||||
handler: 'NetworkFirst',
|
// handler: 'NetworkFirst',
|
||||||
options: {
|
// options: {
|
||||||
cacheName: 'github-api-cache',
|
// cacheName: 'github-api-cache',
|
||||||
expiration: {
|
// expiration: {
|
||||||
maxEntries: 400,
|
// maxEntries: 400,
|
||||||
maxAgeSeconds: 60 * 60 * 24 * 30, // <== 30 days
|
// maxAgeSeconds: 60 * 60 * 24 * 30, // <== 30 days
|
||||||
},
|
// },
|
||||||
cacheableResponse: {
|
// cacheableResponse: {
|
||||||
statuses: [0, 200],
|
// statuses: [0, 200],
|
||||||
},
|
// },
|
||||||
},
|
// },
|
||||||
},
|
// },
|
||||||
],
|
// ],
|
||||||
},
|
// },
|
||||||
devOptions: {
|
devOptions: {
|
||||||
enabled: true,
|
enabled: true,
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user