Skip to content

docs: add @payload-config tsconfig path earlier in installation guide#17113

Open
SakshixSingh wants to merge 1 commit into
payloadcms:mainfrom
SakshixSingh:docs/payload-config-tsconfig-order
Open

docs: add @payload-config tsconfig path earlier in installation guide#17113
SakshixSingh wants to merge 1 commit into
payloadcms:mainfrom
SakshixSingh:docs/payload-config-tsconfig-order

Conversation

@SakshixSingh

Copy link
Copy Markdown
Contributor

fixes #16935

What?

Reorders the "Adding to an existing app" section in docs/getting-started/installation.mdx so users set up the @payload-config TypeScript path alias earlier in the installation flow.

Before: Install packages → Copy Payload files → Add Next.js plugin → Create config + tsconfig path → Start app

After: Install packages → Create Payload config → Add @payload-config to tsconfig.json → Copy Payload files → Add Next.js plugin → Start app

Also adds:

A warning that a missing @payload-config path is a common cause of setup errors
Examples for both ./payload.config.ts and ./src/payload.config.ts

Why?

When adding Payload to an existing Next.js app, users often see many TypeScript/IDE errors across admin and API routes. The copied (payload) files import @payload-config, but the docs previously put the tsconfig setup last — after copying those files and updating next.config. Users followed the docs in order, hit errors, and only later found that adding the path alias fixed everything.

How?

Moved Create a Payload Config from step 4 to step 2
Added a dedicated step for Add @payload-config to your TypeScript config (step 3), before copying Payload files or adding the Next.js plugin
Moved Copy Payload files and Add the Payload Plugin to steps 4 and 5
Added a warning banner and documented both root and src/ config path variants

@SakshixSingh

Copy link
Copy Markdown
Contributor Author

Hi! This is a small docs-only change that reorders the installation steps so @payload-config is set up before copying Payload files. Would appreciate a review when someone has a moment. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Start with TS config update, instead of ending with it

1 participant