fix(cms): align layout/page/not-found with Payload 3.81 template (correct importMap path, CSS import, serverFunction)

This commit is contained in:
2026-04-06 15:50:50 +02:00
parent bc111ce8d3
commit a936275581
5 changed files with 63 additions and 11 deletions

View File

@@ -1,23 +1,25 @@
/* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */
/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */
import "@payloadcms/next/css";
import config from "@payload-config";
import {
RootLayout,
handleServerFunctions,
} from "@payloadcms/next/layouts";
import "@payloadcms/next/css";
import type { ServerFunctionClient } from "payload";
import { handleServerFunctions, RootLayout } from "@payloadcms/next/layouts";
import React from "react";
import { importMap } from "./importMap";
import { importMap } from "./admin/importMap.js";
import "./custom.scss";
type Args = {
children: React.ReactNode;
};
const serverFunction = async (args: any) => {
const serverFunction: ServerFunctionClient = async function (args) {
"use server";
return handleServerFunctions({ ...args, config, importMap });
return handleServerFunctions({
...args,
config,
importMap,
});
};
const Layout = ({ children }: Args) => (