-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvite.config.ts
More file actions
35 lines (34 loc) · 850 Bytes
/
Copy pathvite.config.ts
File metadata and controls
35 lines (34 loc) · 850 Bytes
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
import { defineConfig } from 'vite';
import { resolve } from 'path';
import react from '@vitejs/plugin-react';
export default defineConfig({
plugins: [react()],
root: '.',
publicDir: 'public',
build: {
outDir: 'dist',
emptyOutDir: true,
sourcemap: true,
rollupOptions: {
input: {
main: resolve(__dirname, 'index.html'),
},
},
},
server: {
port: 3000,
open: true,
},
resolve: {
alias: {
// UI components
'@': resolve(__dirname, './src/client/ui'),
// Shared code (used by both server and client)
'@shared': resolve(__dirname, './src/shared'),
'@ecs': resolve(__dirname, './src/shared/ecs'),
'@systems': resolve(__dirname, './src/shared/ecs/systems'),
// Client-only code
'@client': resolve(__dirname, './src/client'),
},
},
});