Open digitaledge-git opened 1 month ago
I just figured out that all those chunks are imported with the configPromise used in a server component:
import configPromise from '@payload-config'
import { getPayloadHMR } from '@payloadcms/next/utilities'
const payload = getPayloadHMR({ config: await configPromise })
I just applied the bundle analyzer to a production build of my site and noticed that all payload chunks are being loaded in the frontend of the Next.js website. Is this intended? This adds almost 3MB of data that should only be loaded in the admin panel though.