Files
Messenger/web/vite.config.ts
T

47 lines
1.1 KiB
TypeScript
Raw Normal View History

2026-09-27 19:53:10 +03:00
import tailwindcss from '@tailwindcss/vite'
import react from '@vitejs/plugin-react'
import { defineConfig } from 'vite'
import { VitePWA } from 'vite-plugin-pwa'
// https://vite.dev/config/
export default defineConfig({
plugins: [
react(),
tailwindcss(),
VitePWA({
strategies: 'injectManifest',
srcDir: 'src',
filename: 'sw.ts',
registerType: 'autoUpdate',
manifest: {
name: 'Messenger',
short_name: 'Messenger',
2026-09-28 13:02:58 +03:00
theme_color: '#008080',
background_color: '#c0c0c0',
display: 'standalone',
start_url: '/',
icons: [
{ src: '/icon-192.png', sizes: '192x192', type: 'image/png' },
{ src: '/icon-512.png', sizes: '512x512', type: 'image/png' },
],
},
devOptions: {
enabled: true,
type: 'module',
},
}),
],
server: {
proxy: {
'/api': {
target: 'http://localhost:8080',
changeOrigin: true,
},
2026-09-27 19:53:10 +03:00
'/ws': {
target: 'ws://localhost:8080',
ws: true,
changeOrigin: true,
},
},
},
})