-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathvite.config.ts
More file actions
49 lines (48 loc) · 1.53 KB
/
vite.config.ts
File metadata and controls
49 lines (48 loc) · 1.53 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
import react from '@vitejs/plugin-react';
import { defineConfig } from 'vite';
// https://vitejs.dev/config/
export default defineConfig(() => {
return {
plugins: [react()],
resolve: {
alias: {
'@/api': '/src/api',
'@/components': '/src/components',
'@/data': '/src/data/',
'@/hooks': '/src/hooks',
'@/icons': '/src/icons',
'@/localization': '/src/localization',
'@/panels': '/src/panels',
'@/public': '/public',
'@/redux': '/src/redux',
'@/types': '/src/types',
'@/theme': '/src/theme',
'@/util': '/src/util',
'@/windowmanagement': '/src/windowmanagement'
}
},
server: {
host: true, // Allows access from both localhost and 127.0.0.1
port: 4690
},
base: '/gui',
build: {
rollupOptions: {
output: {
// This is to fix a warning that vite shows when building the project.
// The warning is that chunks are not allowed to be larger than 500kb.
// These manual chunks are placed in separate bundled js files. Since we need
// both on initial load it seems it should be fine to split them like this.
// TODO (ylvse 2025-02-20): We might want to come up with a smarter
// way to split the chunks.
manualChunks: {
mantineHooks: ['@mantine/hooks'],
mantineCore: ['@mantine/core'],
mantineModals: ['@mantine/modals'],
rcdock: ['rc-dock']
}
}
}
}
};
});