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