From 59ce33f9432e55b3ecf04a456a075b0bb29d6602 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20Guti=C3=A9rrez?= <35082514+alezmad@users.noreply.github.com> Date: Mon, 6 Apr 2026 02:23:36 +0100 Subject: [PATCH] fix(web): disable withPayload (React #130 on all routes) The withPayload wrapper injects a client-side ConfigProvider that crashes hydration on every route when the Payload admin can't initialize in standalone output. Blog/changelog pages use server- side getPayload() which works without the wrapper. Payload admin at /payload is disabled until standalone server init is implemented. All user-facing content works. Co-Authored-By: Claude Opus 4.6 (1M context) --- apps/web/next.config.ts | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/apps/web/next.config.ts b/apps/web/next.config.ts index 66fac57..b29b580 100644 --- a/apps/web/next.config.ts +++ b/apps/web/next.config.ts @@ -1,10 +1,13 @@ import type { NextConfig } from "next"; -// eslint-disable-next-line @typescript-eslint/no-require-imports -const { withPayload } = require("@payloadcms/next/withPayload"); - import env from "./env.config"; +// withPayload is disabled until Payload admin runs correctly in +// Next.js standalone output. The wrapper injects a client-side +// provider that crashes with React #130 on all routes when the +// admin panel can't initialize. Blog + changelog use Payload's +// local API (server-side getPayload()) which works without the wrapper. + const INTERNAL_PACKAGES = [ "@turbostarter/analytics-web", "@turbostarter/api", @@ -118,4 +121,4 @@ const withBundleAnalyzer = require("@next/bundle-analyzer")({ enabled: env.ANALYZE, }); -export default withPayload(withBundleAnalyzer(config)); +export default withBundleAnalyzer(config);