2026-03-26 06:18:07 +01:00
|
|
|
/// <reference types="vitest/config" />
|
2026-04-15 06:23:28 +02:00
|
|
|
import { defineConfig } from "@solidjs/start/config";
|
|
|
|
|
import tailwindcss from "@tailwindcss/vite";
|
2026-03-25 22:13:11 +01:00
|
|
|
export default defineConfig({
|
2026-06-11 15:36:44 +05:30
|
|
|
// Register our Nitro middleware that handles all /api/* paths.
|
|
|
|
|
// Workaround for Vinxi 0.5.7 + @solidjs/start 1.3.2 build issue
|
|
|
|
|
// where file-based API routes are not mounted as Nitro handlers.
|
|
|
|
|
middleware: "./src/middleware.ts",
|
2026-03-25 22:13:11 +01:00
|
|
|
vite: {
|
2026-04-15 06:23:28 +02:00
|
|
|
plugins: [tailwindcss()],
|
|
|
|
|
server: {
|
|
|
|
|
proxy: {
|
|
|
|
|
"/api/gateway": {
|
|
|
|
|
target: "http://localhost:9100",
|
|
|
|
|
changeOrigin: true,
|
|
|
|
|
rewrite: (path) =>
|
|
|
|
|
path
|
|
|
|
|
.replace(/^\/api\/gateway\/api(\/|$)/, "/api$1")
|
|
|
|
|
.replace(/^\/api\/gateway(\/|$)/, "/api$1"),
|
|
|
|
|
},
|
2026-06-11 15:36:44 +05:30
|
|
|
"/api/kb": {
|
2026-04-15 06:23:28 +02:00
|
|
|
target: "http://localhost:9100",
|
|
|
|
|
changeOrigin: true,
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
},
|
2026-03-25 22:13:11 +01:00
|
|
|
});
|