From ae1448fe48445f0342430ef0bb154724a9be41c2 Mon Sep 17 00:00:00 2001 From: NIJAT Date: Mon, 29 Dec 2025 12:53:45 +0400 Subject: [PATCH] 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 --- next.config.ts | 2 +- package.json | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/next.config.ts b/next.config.ts index afcbe7e..2dba177 100644 --- a/next.config.ts +++ b/next.config.ts @@ -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, }, diff --git a/package.json b/package.json index 55936b9..3954cee 100644 --- a/package.json +++ b/package.json @@ -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",