style: auto-fix linting issues
This commit is contained in:
parent
2c165d7148
commit
4c5b201b61
2 changed files with 34 additions and 33 deletions
|
|
@ -45,4 +45,4 @@
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"nativeAllowList": ["app.exit", "window.*", "extensions.*", "events.*"]
|
"nativeAllowList": ["app.exit", "window.*", "extensions.*", "events.*"]
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -16,41 +16,42 @@ export default defineConfig(({ mode }) => {
|
||||||
IS_NEUTRALINO && neutralino(),
|
IS_NEUTRALINO && neutralino(),
|
||||||
authGatePlugin(),
|
authGatePlugin(),
|
||||||
VitePWA({
|
VitePWA({
|
||||||
registerType: 'prompt',
|
registerType: 'prompt',
|
||||||
workbox: {
|
workbox: {
|
||||||
globPatterns: ['**/*.{js,css,html,ico,png,svg,json}'],
|
globPatterns: ['**/*.{js,css,html,ico,png,svg,json}'],
|
||||||
cleanupOutdatedCaches: true,
|
cleanupOutdatedCaches: true,
|
||||||
maximumFileSizeToCacheInBytes: 3 * 1024 * 1024, // 3 MiB limit
|
maximumFileSizeToCacheInBytes: 3 * 1024 * 1024, // 3 MiB limit
|
||||||
// Define runtime caching strategies
|
// Define runtime caching strategies
|
||||||
runtimeCaching: [
|
runtimeCaching: [
|
||||||
{
|
{
|
||||||
urlPattern: ({ request }) => request.destination === 'image',
|
urlPattern: ({ request }) => request.destination === 'image',
|
||||||
handler: 'CacheFirst',
|
handler: 'CacheFirst',
|
||||||
options: {
|
options: {
|
||||||
cacheName: 'images',
|
cacheName: 'images',
|
||||||
expiration: {
|
expiration: {
|
||||||
maxEntries: 100,
|
maxEntries: 100,
|
||||||
maxAgeSeconds: 60 * 24 * 60 * 60, // 60 Days
|
maxAgeSeconds: 60 * 24 * 60 * 60, // 60 Days
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
{
|
||||||
{
|
urlPattern: ({ request }) =>
|
||||||
urlPattern: ({ request }) => request.destination === 'audio' || request.destination === 'video',
|
request.destination === 'audio' || request.destination === 'video',
|
||||||
handler: 'CacheFirst',
|
handler: 'CacheFirst',
|
||||||
options: {
|
options: {
|
||||||
cacheName: 'media',
|
cacheName: 'media',
|
||||||
expiration: {
|
expiration: {
|
||||||
maxEntries: 50,
|
maxEntries: 50,
|
||||||
maxAgeSeconds: 60 * 24 * 60 * 60, // 60 Days
|
maxAgeSeconds: 60 * 24 * 60 * 60, // 60 Days
|
||||||
|
},
|
||||||
|
rangeRequests: true, // Support scrubbing
|
||||||
},
|
},
|
||||||
rangeRequests: true, // Support scrubbing
|
|
||||||
},
|
},
|
||||||
},
|
],
|
||||||
],
|
},
|
||||||
},
|
includeAssets: ['instances.json', 'discord.html'],
|
||||||
includeAssets: ['instances.json', 'discord.html'],
|
manifest: false, // Use existing public/manifest.json
|
||||||
manifest: false, // Use existing public/manifest.json
|
}),
|
||||||
}),
|
],
|
||||||
],
|
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue