This commit is contained in:
Egor Pozharov
2026-04-14 17:13:47 +06:00
parent cb3f91c17f
commit 9c9f01b2f2
9 changed files with 9438 additions and 441 deletions

View File

@@ -1,15 +1,31 @@
import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
import tailwindcss from '@tailwindcss/vite'
import { VitePWA } from 'vite-plugin-pwa'
// https://vite.dev/config/
export default defineConfig({
plugins: [react(), tailwindcss()],
plugins: [
react(),
tailwindcss(),
VitePWA({
registerType: 'autoUpdate',
manifest: false, // manifest.json from public
workbox: {
globPatterns: ['**/*.{js,css,html,ico,png,svg,json}'],
runtimeCaching: [
{
urlPattern: /^https:\/\/.*\/api\//,
handler: 'NetworkFirst',
options: {
cacheName: 'api-cache',
},
},
],
},
}),
],
server: {
allowedHosts: ['delivery.loca.lt', '.loca.lt'],
// hmr: {
// host: 'delivery.loca.lt', // Use the hostname provided by localtunnel
// port: 443, // Use HTTPS port
// },
},
})