- 21 Nov, 2025 20 commits
-
-
nextjs-bot authored
-
Joseph authored
- Adjust nested behavior - Include conditional calls to cacheLife --------- Co-authored-by:Ismael <ismael@vercel.com>
-
Zack Tanner authored
Adds logs to collectSegmentError when verbose logging is enabled to help identify errors that occur during this phase.
-
nextjs-bot authored
-
Zack Tanner authored
…cy (#86355)" This reverts commit 5b97f1f7. Investigating if it fixes broken publishes.
-
Niklas Mischkulnig authored
This is generally better for performance
-
JJ Kasper authored
-
Hendrik Liebau authored
By sending the dynamic validation errors to the browser via WebSocket, instead of rendering a validation outlet into the dynamic dev render stream, we can avoid artificially delaying the spawned validation to implicitly wait for the different chunks (static, runtime, and dynamic), without blocking the dev render stream, and instead wait explicitly for all chunks to accumulate. Previously, we were using React's console replaying to get full fidelity error stacks in the browser (including inspectable virtual server modules). Now, we're using the same underlying mechanism by sending a separate RSC stream through the WebSocket that contains only the errors. In the browser, the received errors are then logged with `console.error`, which also triggers that they're displayed in a collapsed Redbox, as was the case before with the replaying. --------- Co-authored-by:Janka Uryga <lolzatu2@gmail.com>
-
Niklas Mischkulnig authored
<!-- Thanks for opening a PR! Your contribution is much appreciated. To make sure your PR is handled as smoothly as possible we request that you follow the checklist sections below. Choose the right checklist for the change(s) that you're making: ## For Contributors ### Improving Documentation - Run `pnpm prettier-fix` to fix formatting issues before opening the PR. - Read the Docs Contribution Guide to ensure your contribution follows the docs guidelines: https://nextjs.org/docs/community/contribution-guide ### Fixing a bug - Related issues linked using `fixes #number` - Tests added. See: https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs - Errors have a helpful link attached, see https://github.com/vercel/next.js/blob/canary/contributing.md ### Adding a feature - Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR. (A discussion must be opened, see https://github.com/vercel/next.js/discussions/new?category=ideas) - Related issues/discussions are linked using `fixes #number` - e2e tests added (https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs) - Documentation added - Telemetry added. In case of a feature if it's used or not. - Errors have a helpful link attached, see https://github.com/vercel/next.js/blob/canary/contributing.md ## For Maintainers - Minimal description (aim for explaining to someone not on the team to understand the PR) - When linking to a Slack thread, you might want to share details of the conclusion - Link both the Linear (Fixes NEXT-xxx) and the GitHub issues - Add review comments if necessary to explain to the reviewer the logic behind a change ### What? ### Why? ### How? Closes NEXT- Fixes # -->
-
Niklas Mischkulnig authored
The list was getting long...
-
nextjs-bot authored
-
Niklas Mischkulnig authored
Upgrade swc from 45 to 48 Based on #85540 - In the AST, strings now contain a `Wtf8Atom` (= not utf8), while `Ident`s keep using the utf8 `Atom`. - swc's comment printing logic also changed slighted, moving some comments around - ~~Some comments are getting lost along the way and/or attached to the wrong line. This also broke server actions which rely on a `__next_internal_client_entry_do_not_use__` at the very top~~
-
Niklas Mischkulnig authored
So that we can then use comments to track a reason why we have added packages to this list.
-
Tobias Koppers authored
### What? fix the import chain showing only modules relevant to the current route fix module graph being merged by path. It's keyed by identifier now. also add more info to import chain, e. g. layer info. and more details in tooltip.
-
Feulf Fnlkps authored
Fix issue [#86365](https://github.com/vercel/next.js/issues/86365) Co-authored-by:
Joseph <joseph.chamochumbi@vercel.com>
-
Joseph authored
Co-authored-by:Rich Haines <hello@richardhaines.dev>
-
Joseph authored
I think maybe these others need a hint too, let's get started with, `errors/missing-suspense-with-csr-bailout` and `errors/prerender-error` - errors/blocking-route.mdx - errors/deopted-into-client-rendering.mdx - errors/dynamic-server-error.mdx - errors/next-prerender-crypto.mdx - errors/next-prerender-current-time.mdx - errors/next-prerender-sync-headers.mdx - errors/next-prerender-sync-params.mdx - errors/sync-dynamic-apis.mdx
-
Tobias Koppers authored
Turbopack: remove Asset supertrait from Module trait. Modules don't have content remove unneeded Asset implementation <!-- Thanks for opening a PR! Your contribution is much appreciated. To make sure your PR is handled as smoothly as possible we request that you follow the checklist sections below. Choose the right checklist for the change(s) that you're making: ## For Contributors ### Improving Documentation - Run `pnpm prettier-fix` to fix formatting issues before opening the PR. - Read the Docs Contribution Guide to ensure your contribution follows the docs guidelines: https://nextjs.org/docs/community/contribution-guide ### Fixing a bug - Related issues linked using `fixes #number` - Tests added. See: https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs - Errors have a helpful link attached, see https://github.com/vercel/next.js/blob/canary/contributing.md ### Adding a feature - Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR. (A discussion must be opened, see https://github.com/vercel/next.js/discussions/new?category=ideas) - Related issues/discussions are linked using `fixes #number` - e2e tests added (https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs) - Documentation added - Telemetry added. In case of a feature if it's used or not. - Errors have a helpful link attached, see https://github.com/vercel/next.js/blob/canary/contributing.md ## For Maintainers - Minimal description (aim for explaining to someone not on the team to understand the PR) - When linking to a Slack thread, you might want to share details of the conclusion - Link both the Linear (Fixes NEXT-xxx) and the GitHub issues - Add review comments if necessary to explain to the reviewer the logic behind a change ### What? ### Why? ### How? Closes NEXT- Fixes # -->
-
Tobias Koppers authored
### What? fix lerna config and add dependency to make turborepo happy
-
Tobias Koppers authored
### What? decode url encoding and relative paths in source maps
-
- 20 Nov, 2025 19 commits
-
-
nextjs-bot authored
-
Vercel Release Bot authored
This auto-generated PR updates the development integration test manifest used when testing Rspack.
-
nextjs-bot authored
-
Kazi Mahbubur Rahman authored
docs: add example for enabling both AVIF and WebP image formats for better image optimization (#86191) ## Title docs: add example for enabling both AVIF and WebP image formats ## Description ### What? This PR enhances the image component documentation by adding examples showing how to enable both AVIF and WebP image formats together in `next.config.js`. It also updates the `image-component` example to demonstrate this configuration. ### Why? Currently, the documentation only shows examples for: - WebP only (default): `formats: ['image/webp']` - AVIF only: `formats: ['image/avif']` However, many developers want to enable both formats together to: - Prefer AVIF for browsers that support it (better compression, ~20% smaller files) - Fall back to WebP for broader browser compatibility - Maximize image optimization across different browsers This configuration is a best practice but wasn't clearly documented with an example. ### How? - Added example configuration `formats: ['image/avif', 'image/webp']` to App Router image component documentation - Added the same example to Pages Router (legacy) image component documentation for consistency - Updated `examples/image-component/next.config.js` to demonstrate the configuration - Added clarification that the order matters - Next.js uses the first format in the array that the browser supports ### Changes Made - `docs/01-app/03-api-reference/02-components/image.mdx` - Added AVIF + WebP example - `docs/02-pages/04-api-reference/01-components/image-legacy.mdx` - Added AVIF + WebP example - `examples/image-component/next.config.js` - Added formats configuration ### Testing - [x] Documentation changes only - no code changes - [x] Verified examples are syntactically correct - [x] Checked that formatting follows Next.js documentation guidelines ### Checklist - [x] Run `pnpm prettier-fix` to fix formatting issues (if applicable) - [x] Documentation follows the docs guidelines - [x] Changes are clear and helpful for developers --------- Co-authored-by:Joseph <joseph.chamochumbi@vercel.com>
-
Tobias Koppers authored
### What? Add an env var to write route hashes into a diagnostics file.
-
Tobias Koppers authored
### What? add test case for self argument filtering
-
Will Binns-Smith authored
This improves how network errors (such as when the bundle analyzer error server is shut down) are shown. Fixes PACK-5877  
-
Luke Sandberg authored
# Refactor Analyzer State Management in Turbopack This PR refactors the state management in the Turbopack ECMAScript analyzer to improve code organization and maintainability. The changes include: - Introduced a `LexicalContext` enum to track the current execution context (function, module, control flow) and remove most dependencies on AstPath - Moved early return stack and variable declaration kind into the `AnalyzerState` struct - Added helper methods for entering and exiting different block types - Improved handling of nested blocks and control flow - Fixed unreachable code detection in anonymous blocks which allows us to drop some redundant unreachable effects from loops - Handle more cases for nested `var` declarations These refactorings are all either fixing minor issues or regularizing state management. This is preparation for splitting this AST traversal into two pieces.
-
Benjamin Woodruff authored
This is dead code, likely left over from the memory backend and/or previous experiments with persistent caching.
-
Benjamin Woodruff authored
Turbopack: perf: Fix unused argument filtering optimization in turbo-tasks for `self` arguments (#86231) Should fix https://github.com/vercel/next.js/pull/86203 ## Validation I ran: ``` rm -rf .next && NEXT_TURBOPACK_TASK_STATISTICS=~/stats-with-fix.json pnpm next build --turbopack --experimental-build-mode=compile ``` over vercel-site and used `jq '[.[].cache_miss]|add' ~/stats-with-fix.json` and `jq '[.[].cache_hit]|add' ~/stats-with-fix.json` to measure the total cache hits/misses. These numbers are pretty stable from run-to-run (`cache_miss` shows zero variance, `cache_hit` shows a minor variance) because Turbopack is (mostly) deterministic. **Canary:** ``` cache_miss: 8603613 cache_hit: 34824116 ``` **With This Fix:** ``` cache_miss: 8602660 cache_hit: 34825148 ``` The difference is surprisingly small (much less than 1%), but it's still an improvement.
-
Janka Uryga authored
Prior to this change any "hole" in a prerender that would block the shell was considered an error and you would be presented with a very generic message explaining all the different ways you could have failed this validation check. With this change we use a new technique to validate the static shell which can now tell the difference between waiting on uncached data or runtime data. It also improves the heuristics around generateMetadata and generateViewport errors. Added new error pages for runtime sync IO and ensure we only validate sync IO after runtime data if the page will be validating runtime prefetches. Restored the validation on HMR update so you can get feedback after saving a new file. --- We've also discovered that hanging inputs are not handled correctly. Fixing this is non-trivial and will be done in a follow-up, so for now, we're disabling the failing tests. --------- Co-authored-by:
Josh Story <story@hey.com> Co-authored-by:
Hendrik Liebau <mail@hendrik-liebau.de>
-
Tobias Koppers authored
fixup Turbopack: disable input source maps for analyze <!-- Thanks for opening a PR! Your contribution is much appreciated. To make sure your PR is handled as smoothly as possible we request that you follow the checklist sections below. Choose the right checklist for the change(s) that you're making: ## For Contributors ### Improving Documentation - Run `pnpm prettier-fix` to fix formatting issues before opening the PR. - Read the Docs Contribution Guide to ensure your contribution follows the docs guidelines: https://nextjs.org/docs/community/contribution-guide ### Fixing a bug - Related issues linked using `fixes #number` - Tests added. See: https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs - Errors have a helpful link attached, see https://github.com/vercel/next.js/blob/canary/contributing.md ### Adding a feature - Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR. (A discussion must be opened, see https://github.com/vercel/next.js/discussions/new?category=ideas) - Related issues/discussions are linked using `fixes #number` - e2e tests added (https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs) - Documentation added - Telemetry added. In case of a feature if it's used or not. - Errors have a helpful link attached, see https://github.com/vercel/next.js/blob/canary/contributing.md ## For Maintainers - Minimal description (aim for explaining to someone not on the team to understand the PR) - When linking to a Slack thread, you might want to share details of the conclusion - Link both the Linear (Fixes NEXT-xxx) and the GitHub issues - Add review comments if necessary to explain to the reviewer the logic behind a change ### What? ### Why? ### How? Closes NEXT- Fixes # -->
-
Tobias Koppers authored
<!-- Thanks for opening a PR! Your contribution is much appreciated. To make sure your PR is handled as smoothly as possible we request that you follow the checklist sections below. Choose the right checklist for the change(s) that you're making: ## For Contributors ### Improving Documentation - Run `pnpm prettier-fix` to fix formatting issues before opening the PR. - Read the Docs Contribution Guide to ensure your contribution follows the docs guidelines: https://nextjs.org/docs/community/contribution-guide ### Fixing a bug - Related issues linked using `fixes #number` - Tests added. See: https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs - Errors have a helpful link attached, see https://github.com/vercel/next.js/blob/canary/contributing.md ### Adding a feature - Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR. (A discussion must be opened, see https://github.com/vercel/next.js/discussions/new?category=ideas) - Related issues/discussions are linked using `fixes #number` - e2e tests added (https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs) - Documentation added - Telemetry added. In case of a feature if it's used or not. - Errors have a helpful link attached, see https://github.com/vercel/next.js/blob/canary/contributing.md ## For Maintainers - Minimal description (aim for explaining to someone not on the team to understand the PR) - When linking to a Slack thread, you might want to share details of the conclusion - Link both the Linear (Fixes NEXT-xxx) and the GitHub issues - Add review comments if necessary to explain to the reviewer the logic behind a change ### What? ### Why? ### How? Closes NEXT- Fixes # -->
-
Janka Uryga authored
This PR exploits some Node internals to make sure that, if we schedule some timeouts back to back to perform staged rendering, they'll actually run in the same iteration of the event loop. If we cannot patch the timeouts correctly (due to runtime differences in e.g. Bun, or changes in future node versions), we'll warn that Cache Components may not function correctly, and run the timers normally. timer/immediate interleaving is rare in practice, and we'll usually be fine even without this patch, so it's better to warn and try to carry on rather than to error out. (h/t to @sokra for finding this trick)
-
Tobias Koppers authored
### What? Method is unused
-
Tobias Koppers authored
### What? Make stuff more type safe. Use destructuring to avoid forgetting fields
-
Janka Uryga authored
In a dynamic Fizz (SSR) render, rendering work is initially scheduled using microtasks, and a flush will be attempted when the stream gets pulled: https://github.com/facebook/react/blob/8ac5f4eb3601f7381462f8b74ecf24d47259cc20/packages/react-dom/src/server/ReactDOMFizzServerNode.js#L386-L389 This can cause streaming metadata to flake between appearing in `<head>` and `<body>` depending on if whether it had enough microtasks to render before the flush occurred. In general, if something is async, but available after a couple microtasks, then we shouldn't bother streaming it, it should just go into the initial HTML. We achieve this by waiting a task before allowing the stream to get pulled, which allows all the microtasky work to finish without delaying the response too much.
-
Tobias Koppers authored
### What? Next build breaks when the API doesn't match.
-
Tobias Koppers authored
### What? allow trace level tracing on release builds too
-
- 19 Nov, 2025 1 commit
-
-
nextjs-bot authored
-