diff --git a/next.config.ts b/next.config.ts index afcbe7e..611e4c2 100644 --- a/next.config.ts +++ b/next.config.ts @@ -1,7 +1,8 @@ import type { NextConfig } from "next"; const nextConfig: NextConfig = { - output: 'export', + // Use 'export' for static hosting (CF Pages), 'standalone' for Docker/self-hosting + output: process.env.STATIC_EXPORT === 'true' ? 'export' : 'standalone', images: { unoptimized: true, }, diff --git a/package.json b/package.json index 3954cee..4bd1e86 100644 --- a/package.json +++ b/package.json @@ -6,6 +6,7 @@ "dev": "next dev", "build": "next build", "build:static": "STATIC_EXPORT=true next build", + "pages:build": "STATIC_EXPORT=true npm run build", "start": "next start", "lint": "eslint", "test": "vitest run",