Conversation
| **2. Rename the folder:** | ||
|
|
||
| ```bash | ||
| # Move the admin folder |
| mv app/(payload)/admin app/(payload)/dashboard | ||
| ``` | ||
|
|
||
| **3. Restart your dev server** |
There was a problem hiding this comment.
One missing step: you will have to change the import in src/app/(payload)/layout.tsx
from
import { importMap } from './admin/importMap.js'
to
import { importMap } from './importMap.js'
if you're unlucky and your IDE does not auto-update imports. Maybe just mention that the user needs to make sure old imports referencing the admin folder need to be updated, so they should run build / typecheck and update imports until it passes.
| export default buildConfig({ | ||
| // ... | ||
| routes: { | ||
| admin: '/admin/content', |
There was a problem hiding this comment.
So if you do this:
mv app/(payload) app/admin/content/(payload)
The admin route will be under /admin/content/admin, not /admin/content. Maybe a bit of a strange example, because the API is not part of the payload admin panel, so might not wanna put it under /admin.
Also unlike the first example, this change moves both the payload API and admin panel, so might wanna clarify that in the heading
## Scenario 2: Nested Admin Panel
Fixes #13707