2026-06-29 17:51:54 -04:00
|
|
|
import type { NextConfig } from "next";
|
|
|
|
|
|
|
|
|
|
// Proxy /api/* to the local Bun/Node backend (slice 1f) so the SPA and backend share an
|
|
|
|
|
// origin — session cookies work without cross-origin/CORS gymnastics (DESIGN.md §2.1).
|
|
|
|
|
const nextConfig: NextConfig = {
|
2026-07-23 18:02:24 -04:00
|
|
|
typescript: {
|
|
|
|
|
// The server/ directory uses .ts import extensions (Node native TS) and has its
|
|
|
|
|
// own type-check via `npm run typecheck` in server/. Skip Next.js type checking
|
|
|
|
|
// to avoid false errors from server files that aren't part of the frontend bundle.
|
|
|
|
|
ignoreBuildErrors: true,
|
|
|
|
|
},
|
2026-06-29 17:51:54 -04:00
|
|
|
rewrites: async () => [
|
|
|
|
|
{ source: "/api/:path*", destination: "http://localhost:3001/api/:path*" },
|
|
|
|
|
],
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
export default nextConfig;
|