mirror of
https://github.com/Spythere/pojazdownik.git
synced 2026-05-02 21:08:12 +00:00
feature update: realne zestawienia
This commit is contained in:
+19
-16
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user