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",