fix(web): withPayload + redirect admin + externalized packages
Final working pattern: withPayload via require() for build compatibility, admin page replaced with redirect (no RootPage import = no React #130), payload packages externalized from turbopack bundle. Blog/changelog use server-side getPayload(). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
14
apps/web/src/app/(payload)/layout.tsx
Normal file
14
apps/web/src/app/(payload)/layout.tsx
Normal file
@@ -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 (
|
||||
<html lang="en">
|
||||
<body>{children}</body>
|
||||
</html>
|
||||
);
|
||||
}
|
||||
@@ -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("/");
|
||||
}
|
||||
1
apps/web/src/app/(payload)/payload/importMap.js
Normal file
1
apps/web/src/app/(payload)/payload/importMap.js
Normal file
@@ -0,0 +1 @@
|
||||
export const importMap = {};
|
||||
Reference in New Issue
Block a user