mirror of
https://github.com/Spythere/srjp-td2.git
synced 2026-05-03 13:38:12 +00:00
33 lines
828 B
TypeScript
33 lines
828 B
TypeScript
import { defineConfig } from 'vite';
|
|
import vue from '@vitejs/plugin-vue';
|
|
import { VitePWA } from 'vite-plugin-pwa';
|
|
|
|
// https://vite.dev/config/
|
|
export default defineConfig({
|
|
plugins: [
|
|
vue(),
|
|
VitePWA({
|
|
registerType: 'prompt',
|
|
workbox: {
|
|
disableDevLogs: true,
|
|
globPatterns: ['**/*.{js,css,html,png,svg,jpg,ico}'],
|
|
cleanupOutdatedCaches: true,
|
|
runtimeCaching: [
|
|
{
|
|
urlPattern: /^https:\/\/stacjownik.spythere.eu\/api\/getSceneries/i,
|
|
handler: 'NetworkFirst',
|
|
options: {
|
|
cacheName: 'stacjownik-api-cache',
|
|
cacheableResponse: { statuses: [0, 200] }
|
|
}
|
|
}
|
|
]
|
|
},
|
|
devOptions: { enabled: false, suppressWarnings: true }
|
|
})
|
|
],
|
|
server: {
|
|
port: 5345
|
|
}
|
|
});
|