Migracja na Vite

This commit is contained in:
2022-07-16 16:12:31 +02:00
parent fc56c38c45
commit 46e700583d
63 changed files with 4269 additions and 23282 deletions
+35
View File
@@ -0,0 +1,35 @@
import { defineConfig } from 'vite';
import vue from '@vitejs/plugin-vue';
import { VitePWA } from 'vite-plugin-pwa';
export default defineConfig({
plugins: [
vue(),
VitePWA({
registerType: 'autoUpdate',
workbox: {
globPatterns: ['**/*.{js,css,html,png,svg,img}'],
runtimeCaching: [
{
urlPattern: new RegExp('^https://stacjownik.eu-4.evennode.com/api/getSceneries'),
handler: 'NetworkFirst',
options: {
cacheName: 'sceneries-cache',
expiration: {
maxEntries: 200,
maxAgeSeconds: 60 * 60 * 24 * 60, // <== 60 days
},
cacheableResponse: {
statuses: [0, 200],
},
},
},
],
},
devOptions: {
enabled: true,
},
}),
],
});