mirror of
https://github.com/Spythere/pojazdownik.git
synced 2026-05-03 19:48:11 +00:00
Pobieranie danych z API zamiast lokalnie
This commit is contained in:
+4
-23
@@ -1,7 +1,7 @@
|
||||
import { defineConfig } from 'vite'
|
||||
import vue from '@vitejs/plugin-vue'
|
||||
import { defineConfig } from 'vite';
|
||||
import vue from '@vitejs/plugin-vue';
|
||||
|
||||
import { VitePWA } from "vite-plugin-pwa";
|
||||
import { VitePWA } from 'vite-plugin-pwa';
|
||||
|
||||
// https://vitejs.dev/config/
|
||||
export default defineConfig({
|
||||
@@ -13,22 +13,7 @@ export default defineConfig({
|
||||
globPatterns: ['**/*.{js,css,html,png,svg,img}'],
|
||||
runtimeCaching: [
|
||||
{
|
||||
urlPattern: new RegExp(`^https://wiki.td2.info.pl/images/thumb\/.*`),
|
||||
handler: 'NetworkFirst',
|
||||
options: {
|
||||
cacheName: 'td2-images-cache',
|
||||
expiration: {
|
||||
maxEntries: 400,
|
||||
maxAgeSeconds: 60 * 60 * 24 * 14, // <== 14 days
|
||||
},
|
||||
cacheableResponse: {
|
||||
statuses: [0, 200],
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
{
|
||||
urlPattern: new RegExp(`^https://spythere.github.io/api/readyStock.json`),
|
||||
urlPattern: new RegExp(`^https://spythere.github.io/api\/.*`),
|
||||
handler: 'NetworkFirst',
|
||||
options: {
|
||||
cacheName: 'github-api-cache',
|
||||
@@ -50,7 +35,3 @@ export default defineConfig({
|
||||
],
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user