-
Notifications
You must be signed in to change notification settings - Fork 19
Expand file tree
/
Copy pathvite.config.js
More file actions
57 lines (54 loc) · 1.32 KB
/
vite.config.js
File metadata and controls
57 lines (54 loc) · 1.32 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
import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react';
// https://vitejs.dev/config/
export default defineConfig({
plugins: [react()],
server: {
proxy: {
'/ws': {
target: 'ws://localhost:3030',
ws: true,
},
'/ai-assist': {
target: 'http://localhost:3030',
},
'/ai-copilot': {
target: 'http://localhost:3030',
},
'/livekit-token': {
target: 'http://localhost:3030',
},
'/ai-chat-message': {
target: 'http://localhost:3030',
},
'/ai-chat-undo': {
target: 'http://localhost:3030',
},
},
watch: {
ignored: ['**/test/sampleDirectories/**'],
},
},
// Required to have Vite properly handle these CommonJS imports
optimizeDeps: {
include: [
'sharedb-client-browser/dist/sharedb-client-umd.cjs',
'sharedb-client-browser/dist/ot-json1-presence-umd.cjs',
],
exclude: [
// Exclude Rollup v4 from being bundled,
// because it messes up the WASM part of the build.
'@rollup/browser',
],
// Don't scan test sample directories for dependencies
entries: ['src/**/*.{js,ts,jsx,tsx}', 'index.html'],
},
// Fix CSS warnings
css: {
preprocessorOptions: {
scss: {
api: 'modern-compiler',
},
},
},
});