feature update: realne zestawienia

This commit is contained in:
2023-03-23 22:23:15 +01:00
parent f92c47447e
commit 419b01b53f
4 changed files with 103 additions and 84 deletions
+19 -16
View File
@@ -5,28 +5,31 @@ import { VitePWA } from 'vite-plugin-pwa';
// https://vitejs.dev/config/
export default defineConfig({
server: {
port: 2137,
},
plugins: [
vue(),
VitePWA({
registerType: 'autoUpdate',
workbox: {
globPatterns: ['**/*.{js,css,html,png,svg,img}'],
// runtimeCaching: [
// {
// urlPattern: new RegExp(`^https://spythere.github.io/api\/.*`),
// handler: 'NetworkFirst',
// options: {
// cacheName: 'github-api-cache',
// expiration: {
// maxEntries: 2,
// maxAgeSeconds: 60 * 60 * 24 * 7, // <== 7 days
// },
// cacheableResponse: {
// statuses: [0, 200],
// },
// },
// },
// ],
runtimeCaching: [
{
urlPattern: new RegExp(`^https://rj.td2.info.pl/dist/img/thumbnails/.*`),
handler: 'CacheFirst',
options: {
cacheName: 'swdr-images-cache',
expiration: {
maxEntries: 50,
maxAgeSeconds: 60 * 60 * 24 * 7, // <== 7 days
},
cacheableResponse: {
statuses: [404],
},
},
},
],
},
devOptions: {
enabled: true,