-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathvite.config.js
50 lines (48 loc) · 1.39 KB
/
vite.config.js
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
import { defineConfig } from 'vite'
import { fileURLToPath } from 'url'
import path from 'path'
const __dirname = path.dirname(fileURLToPath(import.meta.url))
export default defineConfig({
resolve: {
extensions: ['.mjs', '.js', '.ts', '.jsx', '.tsx', '.json'],
alias: {
'@': fileURLToPath(new URL('./src', import.meta.url)),
'@core': fileURLToPath(new URL('./src/core', import.meta.url)),
'@network': fileURLToPath(new URL('./src/network', import.meta.url)),
'@entities': fileURLToPath(new URL('./src/entities', import.meta.url)),
'@world': fileURLToPath(new URL('./src/world', import.meta.url)),
'@ui': fileURLToPath(new URL('./src/ui', import.meta.url)),
'@rendering': fileURLToPath(new URL('./src/rendering', import.meta.url))
}
},
server: {
port: 5148,
host: true,
proxy: {
'/mv-proxy': {
target: 'http://localhost:3000',
changeOrigin: true
},
'/proxy-image': {
target: 'http://localhost:3000',
changeOrigin: true
},
'/socket.io': {
target: 'http://localhost:3000',
ws: true
}
}
},
build: {
outDir: 'dist',
assetsDir: 'assets',
sourcemap: false,
rollupOptions: {
output: {
entryFileNames: `assets/[name].js`,
chunkFileNames: `assets/[name].js`,
assetFileNames: `assets/[name].[ext]`
}
}
}
})