-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvite.config.ts
More file actions
51 lines (50 loc) · 1.56 KB
/
vite.config.ts
File metadata and controls
51 lines (50 loc) · 1.56 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
/// <reference types="vitest" />
import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react-swc';
import tailwindcss from '@tailwindcss/vite';
import path from 'path';
// https://vite.dev/config/
export default defineConfig({
plugins: [react(), tailwindcss()],
build: {
// Chunk splitting for better caching
rollupOptions: {
output: {
manualChunks: {
monaco: ['@monaco-editor/react'],
framer: ['framer-motion'],
vendor: ['react', 'react-dom', 'zustand'],
},
},
},
// Source maps for debugging (optional, can disable for smaller build)
sourcemap: false,
// Target modern browsers
target: 'es2020',
},
resolve: {
alias: {
'@/components': path.resolve(__dirname, 'src/components'),
'@/engine': path.resolve(__dirname, 'src/engine'),
'@/types': path.resolve(__dirname, 'src/types'),
'@/hooks': path.resolve(__dirname, 'src/hooks'),
'@/store': path.resolve(__dirname, 'src/store'),
'@/lib': path.resolve(__dirname, 'src/lib'),
'@/constants': path.resolve(__dirname, 'src/constants'),
'@/utils': path.resolve(__dirname, 'src/utils'),
'@/pages': path.resolve(__dirname, 'src/pages'),
'@/challenges': path.resolve(__dirname, 'src/challenges'),
'@/i18n': path.resolve(__dirname, 'src/i18n.ts'),
},
},
test: {
globals: true,
environment: 'node',
include: ['src/**/*.test.ts'],
coverage: {
provider: 'v8',
include: ['src/engine/**'],
reporter: ['text', 'text-summary'],
},
},
});