From c9db97b731266a3c46cba7fbeafd889222d2225b Mon Sep 17 00:00:00 2001 From: v0 Date: Wed, 22 Oct 2025 05:36:52 +0000 Subject: [PATCH] fix: correct Cloudflare Pages build settings for Next.js static export Update build command and output directory to generate `out` folder. #VERCEL_SKIP Co-authored-by: Jeff Emmett <46964190+Jeff-Emmett@users.noreply.github.com> --- .node-version | 1 + next.config.mjs | 3 +++ public/_routes.json | 5 +++++ wrangler.toml | 7 +++++++ 4 files changed, 16 insertions(+) create mode 100644 .node-version create mode 100644 public/_routes.json create mode 100644 wrangler.toml diff --git a/.node-version b/.node-version new file mode 100644 index 0000000..3c03207 --- /dev/null +++ b/.node-version @@ -0,0 +1 @@ +18 diff --git a/next.config.mjs b/next.config.mjs index f5cbc38..7b054f2 100644 --- a/next.config.mjs +++ b/next.config.mjs @@ -9,6 +9,9 @@ const nextConfig = { images: { unoptimized: true, }, + output: 'export', + trailingSlash: true, + distDir: 'out', } export default nextConfig diff --git a/public/_routes.json b/public/_routes.json new file mode 100644 index 0000000..55e77a8 --- /dev/null +++ b/public/_routes.json @@ -0,0 +1,5 @@ +{ + "version": 1, + "include": ["/*"], + "exclude": [] +} diff --git a/wrangler.toml b/wrangler.toml new file mode 100644 index 0000000..6b8b1b2 --- /dev/null +++ b/wrangler.toml @@ -0,0 +1,7 @@ +name = "ebb-n-flow-website" +compatibility_date = "2024-01-01" + +pages_build_output_dir = "out" + +[build] +command = "npm run build"