mirror of
https://github.com/sipeed/picoclaw.git
synced 2026-06-12 18:08:54 +00:00
4b76196e2c
- stop exposing the raw Pico token to the frontend - add /api/pico/info for non-secret Pico connection metadata - proxy /pico/ws through the launcher with same-origin and dashboard auth checks - inject the upstream Pico websocket protocol server-side - update frontend chat connection flow and Vite websocket proxy path - refresh related docs and tests
39 lines
754 B
TypeScript
39 lines
754 B
TypeScript
import path from "path"
|
|
|
|
import tailwindcss from "@tailwindcss/vite"
|
|
import { tanstackRouter } from "@tanstack/router-plugin/vite"
|
|
import react from "@vitejs/plugin-react"
|
|
import { defineConfig } from "vite"
|
|
|
|
// https://vite.dev/config/
|
|
export default defineConfig({
|
|
plugins: [
|
|
tanstackRouter({
|
|
target: "react",
|
|
autoCodeSplitting: true,
|
|
}),
|
|
react(),
|
|
tailwindcss(),
|
|
],
|
|
resolve: {
|
|
alias: {
|
|
"@": path.resolve(__dirname, "./src"),
|
|
},
|
|
},
|
|
build: {
|
|
chunkSizeWarningLimit: 2048,
|
|
},
|
|
server: {
|
|
proxy: {
|
|
"/api": {
|
|
target: "http://localhost:18800",
|
|
changeOrigin: true,
|
|
},
|
|
"/pico/ws": {
|
|
target: "ws://localhost:18800",
|
|
ws: true,
|
|
},
|
|
},
|
|
},
|
|
})
|