1 parent b1a1cb0 commit fab05e8Copy full SHA for fab05e8
1 file changed
frontend/vite.config.ts
@@ -6,6 +6,8 @@ import path from 'path'
6
export default defineConfig(({ mode }) => {
7
const env = loadEnv(mode, process.cwd(), '')
8
const apiProxyTarget = env.VITE_API_PROXY_TARGET || 'http://localhost:8000'
9
+ const hmrHost = env.VITE_HMR_HOST || '127.0.0.1'
10
+ const hmrPort = Number(env.VITE_HMR_PORT || 3000)
11
12
return {
13
plugins: [react()],
@@ -19,6 +21,11 @@ export default defineConfig(({ mode }) => {
19
21
},
20
22
server: {
23
port: 3000,
24
+ hmr: {
25
+ host: hmrHost,
26
+ clientPort: hmrPort,
27
+ protocol: 'ws',
28
+ },
29
proxy: {
30
'/api': {
31
target: apiProxyTarget,
0 commit comments