fix(web): disable withPayload (React #130 on all routes)
Some checks failed
CI / Lint (push) Has been cancelled
CI / Typecheck (push) Has been cancelled
CI / Broker tests (Postgres) (push) Has been cancelled
CI / Docker build (linux/amd64) (push) Has been cancelled

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) <noreply@anthropic.com>
This commit is contained in:
Alejandro Gutiérrez
2026-04-06 02:23:36 +01:00
parent 2cdcdccbc9
commit 59ce33f943

View File

@@ -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);