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) <noreply@anthropic.com>
This commit is contained in:
@@ -1,10 +1,13 @@
|
|||||||
import type { NextConfig } from "next";
|
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";
|
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 = [
|
const INTERNAL_PACKAGES = [
|
||||||
"@turbostarter/analytics-web",
|
"@turbostarter/analytics-web",
|
||||||
"@turbostarter/api",
|
"@turbostarter/api",
|
||||||
@@ -118,4 +121,4 @@ const withBundleAnalyzer = require("@next/bundle-analyzer")({
|
|||||||
enabled: env.ANALYZE,
|
enabled: env.ANALYZE,
|
||||||
});
|
});
|
||||||
|
|
||||||
export default withPayload(withBundleAnalyzer(config));
|
export default withBundleAnalyzer(config);
|
||||||
|
|||||||
Reference in New Issue
Block a user