Open
Description
Describe the Bug
When making the admin route "/" custom views are unreachable as the forward slash is removed from path for instance "/custom-view" becomes "custom-view" which leads to 404.
Link to the code that reproduces this issue
https://github.com/rubyjasmin/custom-components-bug-reproduction
Reproduction Steps
- Run
npx create-payload-app --example custom-components
- Move files inside admin to root path and modify import paths
- Config
routes:{ admin:"/" }
andimportMapFile: path.resolve(dirname, "app", "importMap.js")
- Run app and visit /custom
Which area(s) are affected? (Select all that apply)
area: ui
Environment Info
Binaries:
Node: 22.15.1
npm: 10.9.2
Yarn: 1.22.22
pnpm: 10.11.0
Relevant Packages:
payload: 3.42.0
next: 15.3.3
@payloadcms/db-postgres: 3.42.0
@payloadcms/graphql: 3.42.0
@payloadcms/next/utilities: 3.42.0
@payloadcms/richtext-lexical: 3.42.0
@payloadcms/translations: 3.42.0
@payloadcms/ui/shared: 3.42.0
react: 19.1.0
react-dom: 19.1.0
Operating System:
Platform: darwin
Arch: x64
Version: Darwin Kernel Version 24.5.0: Tue Apr 22 19:53:26 PDT 2025; root:xnu-11417.121.6~2/RELEASE_X86_64
Available memory (MB): 8192
Available CPU cores: 4
Metadata
Metadata
Assignees
Labels
No labels