diff --git a/apps/web/next.config.ts b/apps/web/next.config.ts index 63e05c2..a1c12e4 100644 --- a/apps/web/next.config.ts +++ b/apps/web/next.config.ts @@ -1,5 +1,8 @@ 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"; const INTERNAL_PACKAGES = [ @@ -121,4 +124,4 @@ const withBundleAnalyzer = require("@next/bundle-analyzer")({ enabled: env.ANALYZE, }); -export default withBundleAnalyzer(config); +export default withPayload(withBundleAnalyzer(config)); diff --git a/apps/web/src/app/(payload)/layout.tsx b/apps/web/src/app/(payload)/layout.tsx new file mode 100644 index 0000000..bdcfe53 --- /dev/null +++ b/apps/web/src/app/(payload)/layout.tsx @@ -0,0 +1,14 @@ +import "@payloadcms/next/css"; +import type { ReactNode } from "react"; + +export const metadata = { + title: "CMS — claudemesh", +}; + +export default function PayloadLayout({ children }: { children: ReactNode }) { + return ( + + {children} + + ); +} diff --git a/apps/web/src/app/(payload)/payload/[[...segments]]/page.tsx b/apps/web/src/app/(payload)/payload/[[...segments]]/page.tsx new file mode 100644 index 0000000..fb963c6 --- /dev/null +++ b/apps/web/src/app/(payload)/payload/[[...segments]]/page.tsx @@ -0,0 +1,7 @@ +import { redirect } from "next/navigation"; + +// Payload admin disabled in production standalone output. +// Use local dev server for CMS admin. +export default function PayloadAdminRedirect() { + redirect("/"); +} diff --git a/apps/web/src/app/(payload)/payload/importMap.js b/apps/web/src/app/(payload)/payload/importMap.js new file mode 100644 index 0000000..73849ab --- /dev/null +++ b/apps/web/src/app/(payload)/payload/importMap.js @@ -0,0 +1 @@ +export const importMap = {};