-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathvite.config.ts
More file actions
46 lines (45 loc) · 1.2 KB
/
vite.config.ts
File metadata and controls
46 lines (45 loc) · 1.2 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
import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react';
import { nodePolyfills } from 'vite-plugin-node-polyfills';
import tailwindcss from '@tailwindcss/vite';
import path from 'path';
import { visualizer } from 'rollup-plugin-visualizer';
// https://vite.dev/config/
export default defineConfig({
plugins: [
react(),
tailwindcss(),
nodePolyfills({
globals: {
process: true, // Polyfills process for Dynamic
},
}),
visualizer({
filename: './stats.html', // Output file in project root
open: true, // Automatically open the report in the browser after build
gzipSize: true, // Show gzip size
brotliSize: true, // Show brotli size
}),
],
resolve: {
alias: {
'@': path.resolve(__dirname, './src'),
},
},
build: {
chunkSizeWarningLimit: 1000, // Increase limit to 1MB to reduce warnings
},
server: {
hmr: {
protocol: 'ws',
host: 'localhost',
port: 5173,
},
host: '0.0.0.0', // Listen on all available network interfaces
// ngrok
// allowedHosts: ['6c3b-2a01-4ff-f0-c8d4-00-1.ngrok-free.app']
watch: {
ignored: ['**/docs/**', '**/node_modules/**'],
},
},
});