-
Notifications
You must be signed in to change notification settings - Fork 428
Expand file tree
/
Copy pathvite.config.ts
More file actions
78 lines (74 loc) · 1.61 KB
/
vite.config.ts
File metadata and controls
78 lines (74 loc) · 1.61 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 { sentryVitePlugin } from '@sentry/vite-plugin';
import { tanstackStart } from '@tanstack/react-start/plugin/vite';
import path from 'path';
import react from '@vitejs/plugin-react';
import { defineConfig } from 'vite';
export default defineConfig({
base: '/cadam',
plugins: [
tanstackStart({
router: {
basepath: '/cadam',
},
spa: {
enabled: true,
maskPath: '/cadam',
},
}),
react(),
sentryVitePlugin({
org: 'adamcad',
project: 'adamcad',
}),
],
resolve: {
alias: {
'@': path.resolve(__dirname, './src'),
'@shared': path.resolve(__dirname, './shared'),
},
},
build: {
chunkSizeWarningLimit: 1000,
outDir: 'dist/cadam',
emptyOutDir: true,
rollupOptions: {
output: {
manualChunks(id) {
if (
id.includes('/node_modules/react/') ||
id.includes('/node_modules/react-dom/') ||
id.includes('/node_modules/@tanstack/react-router/') ||
id.includes('/node_modules/@tanstack/react-start/') ||
id.includes('/node_modules/lucide-react/')
) {
return 'vendor';
}
},
},
},
sourcemap: true,
},
environments: {
client: {
build: {
outDir: 'dist/cadam',
},
},
server: {
build: {
outDir: 'dist/cadam/server',
},
},
},
preview: {
port: 4173,
host: true,
},
server: {
port: 3000,
open: false,
},
optimizeDeps: {
exclude: ['@zip.js/zip.js', 'three', 'three-stdlib', '@sentry/vite-plugin'],
},
});