[Workers] Recommend vinext for Next.js#31887
Conversation
|
This pull request requires reviews from CODEOWNERS as it changes files that match the following patterns:
|
|
I fetched the PR metadata and full diff via |
|
/bonk review again and suggest changes and improvements |
There was a problem hiding this comment.
A few suggestions for this PR.
MEDIUM — opennext.mdx violates the WranglerConfig component convention (must use TOML input, not JSONC). Posted an inline suggestion.
LOW — Run pnpm run format on the changed files. Prettier reports issues in 5 files.
INFO — The redirect warning for /workers/framework-guides/web-apps/nextjs/ is a false positive. Both the old nextjs.mdx and the new nextjs/index.mdx map to the same canonical URL under Astro's trailingSlash: 'always' setting, so no new redirect is required. Pre-existing redirects in public/__redirects (lines 1481, 2770, 2771) target the path without a trailing slash; updating them would avoid an unnecessary redirect hop, but that is out of scope for this PR.
| ```jsonc | ||
| { | ||
| "$schema": "./node_modules/wrangler/config-schema.json", | ||
| "name": "my-app", | ||
| "main": ".open-next/worker.js", | ||
| "compatibility_date": "$today", | ||
| "compatibility_flags": ["nodejs_compat"], | ||
| "assets": { | ||
| "directory": ".open-next/assets", | ||
| "binding": "ASSETS" | ||
| }, | ||
| "observability": { | ||
| "enabled": true | ||
| } | ||
| } | ||
| ``` |
There was a problem hiding this comment.
Use TOML input for WranglerConfig — JSON is auto-generated by the component.
| ```jsonc | |
| { | |
| "$schema": "./node_modules/wrangler/config-schema.json", | |
| "name": "my-app", | |
| "main": ".open-next/worker.js", | |
| "compatibility_date": "$today", | |
| "compatibility_flags": ["nodejs_compat"], | |
| "assets": { | |
| "directory": ".open-next/assets", | |
| "binding": "ASSETS" | |
| }, | |
| "observability": { | |
| "enabled": true | |
| } | |
| } | |
| ``` | |
| ```toml | |
| name = "my-app" | |
| main = ".open-next/worker.js" | |
| compatibility_date = "$today" | |
| compatibility_flags = ["nodejs_compat"] | |
| [assets] | |
| directory = ".open-next/assets" | |
| binding = "ASSETS" | |
| [observability] | |
| enabled = true | |
| ``` |
|
Posted a review on PR #31887. Findings:
|
|
/bonk fix all issues you identified in review |
Co-authored-by: irvinebroque <irvinebroque@users.noreply.github.com>
|
Fixed all review issues on PR #31887. Here's what changed: Changes made
Formatting fixes (5 files)
All 5 files had Prettier code-style issues (mostly table alignment and import statement formatting). Ran Verification
|
Summary
Updates the Next.js documentation to make vinext on Workers the default recommended path. The canonical Workers Next.js guide now leads with adding vinext to a normal Next.js project through the vinext Agent Skill or
vinext init, while preserving visible OpenNext and Next on Pages pages for existing projects and compatibility cases.This also updates Pages references so static exports and Next on Pages are not presented as the default full-stack Next.js path.
Screenshots (optional)
Documentation checklist