forked from cotect-dev/cotect
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvite.config.ts
More file actions
60 lines (59 loc) · 1.58 KB
/
Copy pathvite.config.ts
File metadata and controls
60 lines (59 loc) · 1.58 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
import path from 'path'
import { defineConfig } from 'vitest/config'
import react from '@vitejs/plugin-react'
import tailwindcss from '@tailwindcss/vite'
export default defineConfig({
plugins: [react(), tailwindcss()],
resolve: {
alias: {
'@': path.resolve(__dirname, './src'),
},
},
build: {
rollupOptions: {
output: {
manualChunks: {
'vendor-reactflow': ['@xyflow/react'],
'vendor-ui': ['@base-ui/react', 'lucide-react', '@dnd-kit/core'],
'vendor-tauri': ['@tauri-apps/api', '@tauri-apps/plugin-dialog', '@tauri-apps/plugin-fs'],
// CodeNode (the lazy chunk holding the editor) is preloaded at
// startup from main.tsx; splitting CodeMirror's core into its own
// vendor chunk lets the two fetch in parallel.
'vendor-codemirror': [
'@codemirror/view',
'@codemirror/state',
'@codemirror/lang-javascript',
'@codemirror/lang-json',
'@codemirror/lang-css',
],
},
},
},
},
test: {
globals: true,
environment: 'jsdom',
include: ['src/**/*.test.{ts,tsx}'],
setupFiles: ['src/test/setup.ts'],
coverage: {
include: ['src/**/*.{ts,tsx}'],
exclude: ['src/test/**'],
},
},
clearScreen: false,
server: {
watch: {
ignored: [
'**/tauri/**',
'**/docs/**',
'**/node_modules/**',
'**/.git/**',
'**/.superpowers/**',
'**/dist/**',
'**/overview.md',
'**/README.md',
],
},
strictPort: true,
},
})