feat: 初始化 Go2 导航代码与配置
This commit is contained in:
33
unitree_ui/unitree_ui-main/vite.config.ts
Normal file
33
unitree_ui/unitree_ui-main/vite.config.ts
Normal file
@@ -0,0 +1,33 @@
|
||||
import { defineConfig } from 'vite';
|
||||
import { robotProxyPlugin } from './src/proxy-plugin';
|
||||
|
||||
export default defineConfig({
|
||||
root: '.',
|
||||
build: {
|
||||
outDir: 'dist',
|
||||
},
|
||||
plugins: [robotProxyPlugin()],
|
||||
server: {
|
||||
// Single unified WebSocket upgrade proxy for the BLE backend
|
||||
// (HTTP paths still go through robotProxyPlugin)
|
||||
proxy: {
|
||||
'/ble-api/ws': {
|
||||
target: 'ws://127.0.0.1:5051',
|
||||
ws: true,
|
||||
rewrite: (path) => path.replace(/^\/ble-api/, ''),
|
||||
},
|
||||
},
|
||||
// Keep Vite's file watcher out of the decompiled APK trees —
|
||||
// they contain tens of thousands of smali files and blow past
|
||||
// Linux's default inotify watcher limit (ENOSPC).
|
||||
watch: {
|
||||
ignored: [
|
||||
'**/reverse_engineer/**',
|
||||
'**/_frontend_*/**',
|
||||
'**/node_modules/**',
|
||||
'**/.git/**',
|
||||
'**/dist/**',
|
||||
],
|
||||
},
|
||||
},
|
||||
});
|
||||
Reference in New Issue
Block a user