web: NEXT_DIST_DIR override for parallel dev servers/builds
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
3 changed files +4 −0
modified
.gitignore
+1 −0
@@ -7,6 +7,7 @@ __pycache__/ | |||||
| 7 | /data/ | 7 | /data/ | ||
| 8 | node_modules/ | 8 | node_modules/ | ||
| 9 | .next/ | 9 | .next/ | ||
| 10 | +.next-*/ | ||||
| 10 | tmp/ | 11 | tmp/ | ||
| 11 | .DS_Store | 12 | .DS_Store | ||
| 12 | deploy/.admin-token | 13 | deploy/.admin-token | ||
modified
apps/web/.gitignore
+1 −0
@@ -1,4 +1,5 @@ | |||||
| 1 | .next/ | 1 | .next/ | ||
| 2 | +.next-*/ | ||||
| 2 | out/ | 3 | out/ | ||
| 3 | node_modules/ | 4 | node_modules/ | ||
| 4 | next-env.d.ts | 5 | next-env.d.ts | ||
modified
apps/web/next.config.ts
+2 −0
@@ -17,6 +17,8 @@ for (const candidate of [path.resolve(process.cwd(), '../../.env'), path.resolve | |||||
| 17 | const API_URL = (process.env.API_URL ?? 'http://127.0.0.1:8331').replace(/\/$/, ''); | 17 | const API_URL = (process.env.API_URL ?? 'http://127.0.0.1:8331').replace(/\/$/, ''); | ||
| 18 | 18 | ||||
| 19 | const nextConfig: NextConfig = { | 19 | const nextConfig: NextConfig = { | ||
| 20 | + // NEXT_DIST_DIR lets parallel dev servers / builds use separate output dirs (default .next) | ||||
| 21 | + distDir: process.env.NEXT_DIST_DIR || '.next', | ||||
| 20 | reactStrictMode: true, | 22 | reactStrictMode: true, | ||
| 21 | poweredByHeader: false, | 23 | poweredByHeader: false, | ||
| 22 | allowedDevOrigins: ['127.0.0.1', 'localhost'], | 24 | allowedDevOrigins: ['127.0.0.1', 'localhost'], | ||
| 23 | 25 | ||||