-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvite.config.ts
More file actions
66 lines (65 loc) · 1.33 KB
/
Copy pathvite.config.ts
File metadata and controls
66 lines (65 loc) · 1.33 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
/// <reference types="vitest" />
import tailwindcss from '@tailwindcss/vite'
import react from '@vitejs/plugin-react'
import { defineConfig, type PluginOption } from 'vite'
import checker from 'vite-plugin-checker'
import inspect from 'vite-plugin-inspect'
import svgr from 'vite-plugin-svgr'
import tsconfigPaths from 'vite-tsconfig-paths'
// https://vitejs.dev/config
export default defineConfig({
plugins: [
react({
babel: {
plugins: [['babel-plugin-react-compiler', {}]]
}
}),
svgr({
svgrOptions: {
plugins: ['@svgr/plugin-svgo', '@svgr/plugin-jsx'],
svgoConfig: {
plugins: [
{
name: 'preset-default',
params: {
overrides: {
removeViewBox: false,
cleanupIds: {
minify: false
}
}
}
},
{
name: 'prefixIds',
params: {
prefixIds: true,
prefixClassNames: false
}
}
]
}
}
}),
tsconfigPaths() as PluginOption,
tailwindcss(),
checker({
typescript: true,
terminal: false // Reduce console output
}),
inspect() // Visit http://localhost:5173/__inspect/
],
server: {
host: true, // Allow access from network
proxy: {
'/api': {
target: 'http://localhost:3001',
changeOrigin: true
}
}
},
build: {
sourcemap: false,
chunkSizeWarningLimit: 1000
}
})