fix: build config for dual Docker/Cloudflare support

- next.config.ts: Auto-detects Cloudflare Pages (CF_PAGES) to use 'export', defaults to 'standalone' for Docker
- wrangler.json: Removed invalid binding for static deploy
- package.json: Added build:static script
This commit is contained in:
NIJAT
2025-12-29 12:53:45 +04:00
parent 86d7ec6bc5
commit ae1448fe48
2 changed files with 2 additions and 1 deletions
+1 -1
View File
@@ -1,7 +1,7 @@
import type { NextConfig } from "next";
const nextConfig: NextConfig = {
output: 'export',
output: (process.env.STATIC_EXPORT || process.env.CF_PAGES) ? 'export' : 'standalone',
images: {
unoptimized: true,
},
+1
View File
@@ -5,6 +5,7 @@
"scripts": {
"dev": "next dev",
"build": "next build",
"build:static": "STATIC_EXPORT=true next build",
"start": "next start",
"lint": "eslint",
"test": "vitest run",