docs: add @payload-config tsconfig path earlier in installation guide#17113
Open
SakshixSingh wants to merge 1 commit into
Open
docs: add @payload-config tsconfig path earlier in installation guide#17113SakshixSingh wants to merge 1 commit into
SakshixSingh wants to merge 1 commit into
Conversation
Contributor
Author
|
Hi! This is a small docs-only change that reorders the installation steps so |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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