From 1b5664e826ba993e0e7834b29b84cb4c27ed0b73 Mon Sep 17 00:00:00 2001 From: ordinarthur <@arthurbarre.js@gmail.com> Date: Tue, 21 Apr 2026 19:18:09 +0200 Subject: [PATCH] fix(admin): register HomePreviewEditor in importMap MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The importMap is static and committed — it doesn't auto-detect new Payload admin components at build time, which is why the homepage global rendered blank (getFromImportMap: PayloadComponent not found). Regenerated with `payload generate:importmap` and added the same command to the Dockerfile so any future admin component wires up automatically. Co-Authored-By: Claude Opus 4.7 --- nextjs/Dockerfile | 2 ++ nextjs/src/app/(payload)/admin/importMap.js | 6 ++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/nextjs/Dockerfile b/nextjs/Dockerfile index 6298bea..12d8397 100644 --- a/nextjs/Dockerfile +++ b/nextjs/Dockerfile @@ -27,6 +27,8 @@ ENV DATABASE_URL=postgres://placeholder:placeholder@localhost:5432/placeholder ENV STRIPE_SECRET_KEY=sk_test_abcdefghijklmnopqrstuvwxyz1234567890 ENV NEXT_PUBLIC_SERVER_URL=https://rebours.studio +# Regenerate Payload importMap so any newly referenced admin components are wired up +RUN pnpm payload generate:importmap RUN pnpm build # Trim dev deps to shrink the runtime image diff --git a/nextjs/src/app/(payload)/admin/importMap.js b/nextjs/src/app/(payload)/admin/importMap.js index e3acbb9..d7a4a84 100644 --- a/nextjs/src/app/(payload)/admin/importMap.js +++ b/nextjs/src/app/(payload)/admin/importMap.js @@ -1,10 +1,12 @@ -import { LinkToDoc as LinkToDoc_2e9be70cd13299dd4a11a5bd739a5a3c } from '@payloadcms/plugin-stripe/client' import { default as default_7060fcf8de405c49f267d6b95f29dcb7 } from '@/components/admin/ProductPreviewEditor' +import { LinkToDoc as LinkToDoc_2e9be70cd13299dd4a11a5bd739a5a3c } from '@payloadcms/plugin-stripe/client' +import { default as default_6eaf42e1c65be845728563a2a0129d3a } from '@/components/admin/HomePreviewEditor' import { CollectionCards as CollectionCards_f9c02e79a4aed9a3924487c0cd4cafb1 } from '@payloadcms/next/rsc' /** @type import('payload').ImportMap */ export const importMap = { - "@payloadcms/plugin-stripe/client#LinkToDoc": LinkToDoc_2e9be70cd13299dd4a11a5bd739a5a3c, "@/components/admin/ProductPreviewEditor#default": default_7060fcf8de405c49f267d6b95f29dcb7, + "@payloadcms/plugin-stripe/client#LinkToDoc": LinkToDoc_2e9be70cd13299dd4a11a5bd739a5a3c, + "@/components/admin/HomePreviewEditor#default": default_6eaf42e1c65be845728563a2a0129d3a, "@payloadcms/next/rsc#CollectionCards": CollectionCards_f9c02e79a4aed9a3924487c0cd4cafb1 }