Skip to content

fix(docs): small next config changes#7508

Merged
mhartington merged 1 commit intomainfrom
fix/config-updates
Feb 17, 2026
Merged

fix(docs): small next config changes#7508
mhartington merged 1 commit intomainfrom
fix/config-updates

Conversation

@mhartington
Copy link
Member

@mhartington mhartington commented Feb 17, 2026

Summary by CodeRabbit

  • Chores
    • Updated documentation site asset serving configuration.
    • Reformatted TypeScript compiler configuration for improved maintainability.

@vercel
Copy link

vercel bot commented Feb 17, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
docs Ready Ready Preview, Comment Feb 17, 2026 11:57am

Request Review

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 17, 2026

Walkthrough

Next.js configuration in apps/docs was updated to use a fixed assetPrefix of '/docs' with allowedDevOrigins added for development proxy asset loading. TypeScript configuration was reformatted with multi-line array declarations and a new type declaration path entry added.

Changes

Cohort / File(s) Summary
Next.js Configuration
apps/docs/next.config.mjs
Changed assetPrefix from conditional (environment-based) to fixed '/docs' value, removed basePath property, and added allowedDevOrigins: ['http://prisma.io'] to permit development asset loading through proxy.
TypeScript Configuration
apps/docs/tsconfig.json
Converted lib and path mapping arrays to multi-line formatting, added new type declaration entry (.next/dev/dev/types/**/*.ts) to include section, and reformatted exclude array. No behavioral changes to compilation targets or module resolution.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately reflects the primary changes: modifications to Next.js configuration in the docs app, including assetPrefix adjustments, basePath removal, and allowedDevOrigins addition.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link
Contributor

🍈 Lychee Link Check Report

3660 links: ✅ 2975 OK | 🚫 19 errors | 🔀 0 redirects | 👻 664 excluded

❌ Errors

./apps/docs/content/docs.v6/(index)/prisma-orm/add-to-existing-project/mongodb.mdx

./apps/docs/content/docs.v6/(index)/prisma-orm/quickstart/mongodb.mdx

./apps/docs/content/docs.v6/ai/index.mdx

./apps/docs/content/docs.v6/orm/more/comparisons/prisma-and-drizzle.mdx

./apps/docs/content/docs.v6/orm/more/dev-environment/editor-setup.mdx

  • [503] https://fig.io/ | Rejected status code (this depends on your "accept" configuration): Service Unavailable

./apps/docs/content/docs.v6/orm/overview/introduction/should-you-use-prisma.mdx

./apps/docs/content/docs.v6/orm/overview/prisma-in-your-stack/graphql.mdx

./apps/docs/content/docs.v6/orm/prisma-client/setup-and-configuration/databases-connections/index.mdx

./apps/docs/content/docs.v6/orm/prisma-client/testing/integration-testing.mdx

./apps/docs/content/docs.v6/orm/prisma-client/testing/unit-testing.mdx

./apps/docs/content/docs.v6/orm/prisma-schema/overview/generators.mdx

./apps/docs/content/docs/(index)/prisma-orm/add-to-existing-project/mongodb.mdx

./apps/docs/content/docs/(index)/prisma-orm/quickstart/mongodb.mdx

./apps/docs/content/docs/ai/index.mdx

./apps/docs/content/docs/orm/more/comparisons/prisma-and-drizzle.mdx

./apps/docs/content/docs/orm/more/dev-environment/editor-setup.mdx

  • [503] https://fig.io/ | Rejected status code (this depends on your "accept" configuration): Service Unavailable

./apps/docs/content/docs/orm/prisma-client/testing/integration-testing.mdx

./apps/docs/content/docs/orm/prisma-client/testing/unit-testing.mdx

./apps/docs/content/docs/orm/prisma-schema/overview/generators.mdx


Full Statistics Table
Status Count
✅ Successful 2975
🔀 Redirected 0
👻 Excluded 664
🚫 Errors 19
⛔ Unsupported 2
⏳ Timeouts 0
❓ Unknown 0

@mhartington mhartington merged commit d8fbc44 into main Feb 17, 2026
5 of 10 checks passed
@mhartington mhartington deleted the fix/config-updates branch February 17, 2026 11:57
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@apps/docs/next.config.mjs`:
- Around line 8-10: The allowedDevOrigins entry is using a URL with scheme;
change allowedDevOrigins to ['prisma.io'] (remove 'http://') and update the
comment next to allowedDevOrigins to clarify whether prisma.io is expected to be
mapped to localhost via hosts file for proxying or if another hostname should be
used; also make assetPrefix conditional so it is only '/docs' in non-development
builds (e.g. use assetPrefix: process.env.NODE_ENV === 'development' ? '' :
'/docs' or honor an env var like ASSET_PREFIX) so local dev does not break asset
routing unless your proxy setup explicitly serves assets under /docs.

In `@apps/docs/tsconfig.json`:
- Around line 47-48: Remove the incorrect duplicate path
".next/dev/dev/types/**/*.ts" from the tsconfig "include" array in
apps/docs/tsconfig.json; keep the correct Next.js type globs (e.g.,
".next/types/**/*.ts" and ".next/dev/types/**/*.ts") so the include entries
match the other apps and no dead config remains.

Comment on lines +8 to +10
assetPrefix: '/docs',
// Allow website (localhost:3001) to load assets when proxying docs
allowedDevOrigins: ['http://prisma.io'],
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

cat -n apps/docs/next.config.mjs

Repository: prisma/web

Length of output: 2397


🌐 Web query:

Next.js allowedDevOrigins configuration option format expected values

💡 Result:

allowedDevOrigins is set in next.config.js/ts as an array of strings:

// next.config.js
module.exports = {
  allowedDevOrigins: ['local-origin.dev', '*.local-origin.dev'],
}

Expected values: each entry is a hostname (domain) or IP you want to allow in development, and you can use a leading wildcard for subdomains (e.g. *.example.com). The official docs show hostnames (not full URLs) as the intended format. [1]

In practice, if you’re trying to allow something like http://127.0.0.1:3000, you typically need to provide just 127.0.0.1 (i.e., omit the http:// and port). [2]

Sources: [1] Next.js docs, allowedDevOrigins option. [2] Next.js community thread discussing format pitfalls.


🏁 Script executed:

# Check for any environment-based logic in the file
head -30 apps/docs/next.config.mjs

Repository: prisma/web

Length of output: 873


The allowedDevOrigins format is incorrect and needs fixing.

The value 'http://prisma.io' includes the protocol scheme, but Next.js expects just the hostname. Change it to 'prisma.io' (without the http://). The comment mentioning localhost:3001 also seems misaligned with the actual value — clarify the intent: are you mapping prisma.io to localhost in your hosts file for the proxy setup, or should this be a different hostname?

Additionally, the assetPrefix: '/docs' is now unconditional — assets will be fetched from /docs/_next/... in all environments, including local dev. Ensure your dev setup (whether proxied or direct) properly handles this asset routing, otherwise you'll have broken assets when running locally.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@apps/docs/next.config.mjs` around lines 8 - 10, The allowedDevOrigins entry
is using a URL with scheme; change allowedDevOrigins to ['prisma.io'] (remove
'http://') and update the comment next to allowedDevOrigins to clarify whether
prisma.io is expected to be mapped to localhost via hosts file for proxying or
if another hostname should be used; also make assetPrefix conditional so it is
only '/docs' in non-development builds (e.g. use assetPrefix:
process.env.NODE_ENV === 'development' ? '' : '/docs' or honor an env var like
ASSET_PREFIX) so local dev does not break asset routing unless your proxy setup
explicitly serves assets under /docs.

Comment on lines +47 to +48
".next/dev/types/**/*.ts",
".next/dev/dev/types/**/*.ts"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🏁 Script executed:

# First, let's read the tsconfig.json file to understand the context
cat -n apps/docs/tsconfig.json | head -60

Repository: prisma/web

Length of output: 1468


🏁 Script executed:

# Search for any references to .next/dev/dev in the codebase
rg '\.next/dev/dev' --type json --type ts --type js

Repository: prisma/web

Length of output: 111


🏁 Script executed:

# Also check for any .next/dev paths to understand the pattern
rg '\.next/dev' apps/docs/tsconfig.json

Repository: prisma/web

Length of output: 118


🏁 Script executed:

# Check if there are other tsconfig.json files in the monorepo with similar patterns
find . -name "tsconfig.json" -type f | head -20

Repository: prisma/web

Length of output: 211


🏁 Script executed:

# Search for any .next patterns in tsconfig files across the repo
rg '\.next/' -g 'tsconfig.json' -A 2 -B 2

Repository: prisma/web

Length of output: 922


🏁 Script executed:

# Check git history to see when this line was added and if there's context
git log --oneline -n 30 -- apps/docs/tsconfig.json 2>/dev/null || echo "Git history not available"

Repository: prisma/web

Length of output: 99


Remove the duplicate .next/dev/dev/types/**/*.ts path from the include array.

Line 48 contains a typo with a doubled dev segment. This pattern doesn't exist in the other Next.js app configs in the monorepo (apps/blog and apps/eclipse both use the standard .next/types/**/*.ts and .next/dev/types/**/*.ts). The extra line is dead config that won't match any actual Next.js-generated types, so it's safe to remove.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@apps/docs/tsconfig.json` around lines 47 - 48, Remove the incorrect duplicate
path ".next/dev/dev/types/**/*.ts" from the tsconfig "include" array in
apps/docs/tsconfig.json; keep the correct Next.js type globs (e.g.,
".next/types/**/*.ts" and ".next/dev/types/**/*.ts") so the include entries
match the other apps and no dead config remains.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant