platform: modularize api/gui, add docs-tests-web foundation, and refresh root config
This commit is contained in:
25
selective-vpn-web/vite.config.ts
Normal file
25
selective-vpn-web/vite.config.ts
Normal file
@@ -0,0 +1,25 @@
|
||||
import { defineConfig, loadEnv } from 'vite'
|
||||
import react from '@vitejs/plugin-react'
|
||||
|
||||
export default defineConfig(({ mode }) => {
|
||||
const env = loadEnv(mode, process.cwd(), '')
|
||||
const target = (env.VITE_DEV_PROXY_TARGET || 'http://127.0.0.1:8080').trim()
|
||||
|
||||
return {
|
||||
plugins: [react()],
|
||||
server: {
|
||||
host: '127.0.0.1',
|
||||
port: 5173,
|
||||
proxy: {
|
||||
'/api': {
|
||||
target,
|
||||
changeOrigin: true,
|
||||
},
|
||||
'/healthz': {
|
||||
target,
|
||||
changeOrigin: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
})
|
||||
Reference in New Issue
Block a user