nxtgauge-frontend-solid/vite.config.ts
Tracewebstudio Dev 4efe848f3a
All checks were successful
build-and-release / build (push) Successful in 2m15s
fix: local dev proxy, TypeScript errors, and test quality
- middleware.ts: default GATEWAY_URL to localhost:9100 (was K8s hostname);
  proxy all /api/* to gateway instead of falling through to SolidStart renderer
- signup/index.tsx: fix kebab-case style property (align-items)
- dashboard/CreditsPage.tsx: fix IIFE closing in Show children
- AskAsh/index.ts: use ~ alias to fix bundler module resolution
- vite.config.ts: add string type to rewrite callback
- global.d.ts: add Window.__captchaCode and __testMode declarations
- help-center/article/[slug].tsx: add missing ContentBlock import
- test/setup.ts: add vitest/globals reference, fix IntersectionObserver mock
- tests/e2e: fix implicit any, string|null/undefined type errors in e2e specs
- tests/tsconfig.json: add tests-specific tsconfig with node types

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-17 00:47:32 +02:00

28 lines
892 B
TypeScript

/// <reference types="vitest/config" />
import { defineConfig } from "@solidjs/start/config";
import tailwindcss from "@tailwindcss/vite";
export default defineConfig({
// 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",
vite: {
plugins: [tailwindcss()],
server: {
proxy: {
"/api/gateway": {
target: "http://localhost:9100",
changeOrigin: true,
rewrite: (path: string) =>
path
.replace(/^\/api\/gateway\/api(\/|$)/, "/api$1")
.replace(/^\/api\/gateway(\/|$)/, "/api$1"),
},
"/api/kb": {
target: "http://localhost:9100",
changeOrigin: true,
},
},
},
},
});