diff --git a/apps/web/next.config.ts b/apps/web/next.config.ts index 4ebd2876ceb..b59de57349d 100644 --- a/apps/web/next.config.ts +++ b/apps/web/next.config.ts @@ -1,5 +1,6 @@ import type { NextConfig } from "next"; import path from "node:path"; +import { homedir } from "node:os"; const nextConfig: NextConfig = { // Produce a self-contained standalone build so npm global installs @@ -17,6 +18,23 @@ const nextConfig: NextConfig = { // Transpile ESM-only packages so webpack can bundle them transpilePackages: ["react-markdown", "remark-gfm"], + + webpack: (config, { dev }) => { + if (dev) { + config.watchOptions = { + ...config.watchOptions, + ignored: [ + "**/node_modules/**", + "**/.git/**", + "**/dist/**", + "**/.next/**", + path.join(homedir(), ".openclaw", "**"), + ], + poll: 1500, + }; + } + return config; + }, }; export default nextConfig;