-
Notifications
You must be signed in to change notification settings - Fork 879
fix(docs): small next config changes #7508
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,7 +2,11 @@ | |
| "compilerOptions": { | ||
| "baseUrl": ".", | ||
| "target": "ESNext", | ||
| "lib": [ "dom", "dom.iterable", "esnext" ], | ||
| "lib": [ | ||
| "dom", | ||
| "dom.iterable", | ||
| "esnext" | ||
| ], | ||
| "allowJs": true, | ||
| "skipLibCheck": true, | ||
| "strict": true, | ||
|
|
@@ -16,10 +20,18 @@ | |
| "jsx": "react-jsx", | ||
| "incremental": true, | ||
| "paths": { | ||
| "@/*": ["./src/*"], | ||
| "@prisma-docs/ui/components/*": ["../../packages/ui/src/components/*"], | ||
| "@prisma-docs/ui/lib/*": ["../../packages/ui/src/lib/*"], | ||
| "fumadocs-mdx:collections/*": [".source/*"] | ||
| "@/*": [ | ||
| "./src/*" | ||
| ], | ||
| "@prisma-docs/ui/components/*": [ | ||
| "../../packages/ui/src/components/*" | ||
| ], | ||
| "@prisma-docs/ui/lib/*": [ | ||
| "../../packages/ui/src/lib/*" | ||
| ], | ||
| "fumadocs-mdx:collections/*": [ | ||
| ".source/*" | ||
| ] | ||
| }, | ||
| "plugins": [ | ||
| { | ||
|
|
@@ -32,7 +44,10 @@ | |
| "**/*.ts", | ||
| "**/*.tsx", | ||
| ".next/types/**/*.ts", | ||
| ".next/dev/types/**/*.ts" | ||
| ".next/dev/types/**/*.ts", | ||
| ".next/dev/dev/types/**/*.ts" | ||
|
Comment on lines
+47
to
+48
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🏁 Script executed: # First, let's read the tsconfig.json file to understand the context
cat -n apps/docs/tsconfig.json | head -60Repository: 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 jsRepository: 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.jsonRepository: 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 -20Repository: 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 2Repository: 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 Line 48 contains a typo with a doubled 🤖 Prompt for AI Agents |
||
| ], | ||
| "exclude": [ "node_modules" ] | ||
| "exclude": [ | ||
| "node_modules" | ||
| ] | ||
| } | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
Repository: prisma/web
Length of output: 2397
🌐 Web query:
Next.js allowedDevOrigins configuration option format expected values💡 Result:
allowedDevOriginsis set innext.config.js/tsas an array of strings: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 just127.0.0.1(i.e., omit thehttp://and port). [2]Sources: [1] Next.js docs,
allowedDevOriginsoption. [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.mjsRepository: prisma/web
Length of output: 873
The
allowedDevOriginsformat 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 thehttp://). The comment mentioninglocalhost:3001also seems misaligned with the actual value — clarify the intent: are you mappingprisma.ioto 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