openclaw/apps/web/next.config.ts
kumarabhirup e1976af8f8
Gateway: build web app on first start, fix workspace dep refs for ironclaw rename
- Remove standalone Next.js output; gateway now installs deps and builds
  on first start, skips if .next/BUILD_ID already exists
- Rename openclaw→ironclaw workspace refs in all 30 extensions + clawdbot/moltbot
- Add @tiptap/core as explicit dep in apps/web (pnpm strict mode requires it)
- Improve ensureDepsInstalled: detect pnpm workspace vs npm global install
- Remove pre-build step from deploy.sh; ship source, build on user machine
- Update package.json files to include full apps/web/ source

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-12 01:10:27 -08:00

26 lines
736 B
TypeScript

import type { NextConfig } from "next";
const nextConfig: NextConfig = {
// Allow long-running API routes for agent streaming
serverExternalPackages: [],
// Transpile ESM-only packages so webpack can bundle them
transpilePackages: ["react-markdown", "remark-gfm"],
// Ensure Node.js built-ins work correctly
webpack: (config, { isServer }) => {
if (isServer) {
// Don't attempt to bundle Node.js built-ins
config.externals = config.externals || [];
config.externals.push({
"node:child_process": "commonjs node:child_process",
"node:path": "commonjs node:path",
"node:readline": "commonjs node:readline",
});
}
return config;
},
};
export default nextConfig;