Files
picoclaw/web/frontend/vite.config.ts
T
Mauro 3316ee6923 feat(web): download files on frontend (#2563)
* feat(web): download attachments in frontend

* fix: proxy pico media and force svg downloads

* feat(web): hide ephemeral media refs from persisted session history
2026-04-22 11:28:04 +08:00

43 lines
856 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/media": {
target: "http://localhost:18800",
changeOrigin: true,
},
"/pico/ws": {
target: "ws://localhost:18800",
ws: true,
},
},
},
})