-
Notifications
You must be signed in to change notification settings - Fork 0
/
vite.config.ts
49 lines (45 loc) · 1.22 KB
/
vite.config.ts
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 { defineConfig } from 'vite'
import type { WatcherOptions } from 'rollup'
import solidPlugin from 'vite-plugin-solid'
import tsconfigPaths from 'vite-tsconfig-paths'
let target = 'http://0.0.0.0:7000'
// let target = 'https://heimdall.00-team.org'
export default defineConfig(env => {
let watch: WatcherOptions | null = null
if (env.mode == 'development') {
watch = {
clearScreen: true,
}
}
return {
plugins: [tsconfigPaths(), solidPlugin({ hot: false })],
root: 'app',
server: {
https: false,
host: '0.0.0.0',
port: 8000,
proxy: {
'/api/': {
target,
changeOrigin: true,
},
'/record/': {
target,
changeOrigin: true,
},
'/static/': {
target,
changeOrigin: true,
},
},
},
build: {
target: 'esnext',
outDir: '../web/dist',
watch,
assetsInlineLimit: 0,
copyPublicDir: false,
emptyOutDir: true,
},
}
})