-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathvite.config.js
More file actions
78 lines (77 loc) · 1.87 KB
/
vite.config.js
File metadata and controls
78 lines (77 loc) · 1.87 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
import { VitePWA } from 'vite-plugin-pwa'
// https://vitejs.dev/config/
export default defineConfig({
plugins: [
react(),
VitePWA({
registerType: 'autoUpdate',
workbox: {
globPatterns: ['**/*.{js,css,html,ico,png,svg}']
},
manifest: {
name: 'Messmate - SRM Hostel Mess Menu',
short_name: 'Messmate',
description: 'Modern mess menu app for SRM University hostels',
theme_color: '#3b82f6',
background_color: '#ffffff',
display: 'standalone',
orientation: 'portrait',
scope: '/',
start_url: '/',
icons: [
{
src: '/pwa-192x192.png',
sizes: '192x192',
type: 'image/png'
},
{
src: '/pwa-512x512.png',
sizes: '512x512',
type: 'image/png'
}
]
}
})
],
build: {
rollupOptions: {
output: {
manualChunks: {
// Split vendor libraries into separate chunks
'react-vendor': ['react', 'react-dom'],
'framer-motion': ['framer-motion'],
'ui-vendor': ['lucide-react', 'react-icons'],
'utils-vendor': ['zustand', 'react-hot-toast', 'react-swipeable'],
}
}
},
// Enable source maps for better debugging
sourcemap: true,
// Optimize chunk size warnings
chunkSizeWarningLimit: 1000,
},
// Optimize dependencies
optimizeDeps: {
include: [
'react',
'react-dom',
'framer-motion',
'lucide-react',
'react-icons',
'zustand',
'react-hot-toast',
'react-swipeable'
]
},
// Development server configuration
server: {
port: 3000,
open: true,
// Enable HMR with performance optimizations
hmr: {
overlay: false
}
}
})