Server entries no longer load 'use client' modules

The main entry and next/middleware re-exported module barrels that also
export React client components (LanguageSwitcher, AlternateLinks*,
AccessibilityWidget), so payload.config, the CLI and the proxy bundle
evaluated React UI. They now import concrete files; i18n client
components moved to modules/i18n/client.ts. test/entryGraph guards it.
Also lint fixes in tests added on this branch.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
Radosław Smoliński
2026-10-22 17:17:42 +02:00
co-authored by Claude Opus 5.5
parent e5d86b8afe
commit 14fd2c497f
18 changed files with 102 additions and 63 deletions
+2 -2
View File
@@ -51,12 +51,12 @@ beforeAll(async () => {
const media = await payload.create({
collection: 'media' as never,
data: { alt: 'hero' } as never,
file: { data: png, mimetype: 'image/png', name: 'hero.png', size: png.length },
file: { name: 'hero.png', data: png, mimetype: 'image/png', size: png.length },
})
mediaId = media.id
const home = await payload.create({ collection: 'pages' as never, data: { slug: 'home', hero: mediaId, title: 'Home' } as never })
const blog = await payload.create({ collection: 'pages' as never, data: { slug: 'blog', hero: mediaId, title: 'Blog' } as never })
await payload.updateGlobal({ slug: 'site-settings' as never, data: { homepage: home.id, featured: home.id, postsArchive: blog.id, siteName: 'Acme' } as never })
await payload.updateGlobal({ slug: 'site-settings' as never, data: { featured: home.id, homepage: home.id, postsArchive: blog.id, siteName: 'Acme' } as never })
}, 60_000)
afterAll(async () => {