Files
langship.sh/web/next.config.mjs
T
patel-lyzr 64a857d1b7 feat: add NodePalette and PipelineCanvas components for enhanced flow node management
- Introduced NodePalette component to display draggable nodes categorized by type.
- Implemented PipelineCanvas component to manage the flow of nodes and connections.
- Integrated drag-and-drop functionality for adding nodes to the canvas.
- Created a catalog of node types with associated metadata for rendering in the palette.
- Established conversion functions between pipeline definitions and React Flow state.
- Added inspector for editing node properties and managing connections.
- Updated Next.js configuration for production and development environments.
- Removed obsolete embed.go file and added nginx configuration for serving the app.
- Updated package dependencies including @xyflow/react for enhanced functionality.
- Added TypeScript definitions for CSS imports to support styling in components.
2026-05-13 22:15:08 +05:30

23 lines
730 B
JavaScript

/** @type {import('next').NextConfig} */
const isProd = process.env.NODE_ENV === "production";
// Where the Go backend is listening during `npm run dev`.
const apiTarget = process.env.FLOW_API_URL ?? "http://localhost:8080";
const nextConfig = {
// Static export only at build time — the Go binary embeds ./out.
// In dev, leave Next as a normal server so we can proxy /api → Go.
...(isProd ? { output: "export" } : {}),
images: { unoptimized: true },
trailingSlash: true,
reactStrictMode: true,
// Dev-only: forward API calls to the Go server.
async rewrites() {
if (isProd) return [];
return [{ source: "/api/:path*", destination: `${apiTarget}/api/:path*` }];
},
};
export default nextConfig;