Merged
Conversation
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
7053048 to
05f5567
Compare
Collaborator
Tests Passed |
Collaborator
Stats from current PR🟢 1 improvement
📊 All Metrics📖 Metrics GlossaryDev Server Metrics:
Build Metrics:
Change Thresholds:
⚡ Dev Server
📦 Dev Server (Webpack) (Legacy)📦 Dev Server (Webpack)
⚡ Production Builds
📦 Production Builds (Webpack) (Legacy)📦 Production Builds (Webpack)
📦 Bundle SizesBundle Sizes⚡ TurbopackClient Main Bundles: **401 kB** → **401 kB** ✅ -23 B80 files with content-based hashes (individual files not comparable between builds) Server Middleware
Build DetailsBuild Manifests
📦 WebpackClient Main Bundles
Polyfills
Pages
Server Edge SSR
Middleware
Build DetailsBuild Manifests
Build Cache
🔄 Shared (bundler-independent)Runtimes
📎 Tarball URL |
eb5179c to
dc19106
Compare
mischnic
reviewed
Feb 26, 2026
packages/next/src/shared/lib/turbopack/is-file-system-cache-enabled-for-build.ts
Outdated
Show resolved
Hide resolved
mischnic
reviewed
Feb 26, 2026
packages/next/src/server/web/spec-extension/adapters/request-cookies.test.ts
Show resolved
Hide resolved
01156b0 to
bacbcb2
Compare
Comment on lines
+1236
to
+1238
| throwTurbopackInternalError: ( | ||
| require('../../shared/lib/turbopack/internal-error') as typeof import('../../shared/lib/turbopack/internal-error') | ||
| ).throwTurbopackInternalError, |
Contributor
There was a problem hiding this comment.
im guessing this one isn't buying you much... we always call createProject don't we?
or is it beneficial simply to defer it?
| // Uses modern browsers as the default. | ||
| return MODERN_BROWSERSLIST_TARGET | ||
| } | ||
| export { getSupportedBrowsers } from './get-supported-browsers' |
Contributor
There was a problem hiding this comment.
just migrate importers to the new module?
Comment on lines
+1
to
+2
| import { formatIssue, isRelevantWarning } from '../shared/lib/turbopack/utils' | ||
| import type { TurbopackResult } from './swc/types' |
Contributor
lukesandberg
approved these changes
Feb 28, 2026
b8fe676 to
4332d7c
Compare
Move getSupportedBrowsers from build/utils.ts to build/get-supported-browsers.ts to reduce the import footprint of utils.ts and allow more targeted imports.
Move printBuildErrors from build/utils.ts to build/print-build-errors.ts to reduce the import footprint of utils.ts.
Move shouldUseReactServerCondition and isWebpackAppPagesLayer from build/utils.ts to build/webpack-layer.ts to reduce the import footprint of utils.ts.
Move isInterceptionRouteRewrite from generate-interception-routes-rewrites.ts to lib/is-interception-route-rewrite.ts to allow importing it without pulling in the full interception routes generation code. Use lazy require in manifest-loader.ts to defer loading.
Remove the trivial isFileSystemCacheEnabledForBuild helper from turbopack/utils.ts and inline the config check at each call site to reduce unnecessary imports.
Convert top-level imports of patch-incorrect-lockfile, download-swc, swc-load-failure, swc/options, turbopack/internal-error, and util to lazy require() calls so they are only loaded when needed. Also fix the eventSwcLoadFailure type to use Pick for the fields actually passed.
Use readFileSync instead of fs.readFile to avoid pulling in the promises-based fs module and simplify the call sites.
Add missing node-environment-baseline import in fast-set-immediate test. Lazy-load workUnitAsyncStorage and createCookiesWithMutableAccessCheck in request-cookies test to avoid importing modules that depend on globals not yet set up at import time.
Reflect module extraction and lazy-loading changes in the expected server trace file list: removed files no longer statically imported (utils.js, format.js, segment-config, static-paths, async-sema, text-table, create-incremental-cache) and added new modules (webpack-layer.js, is-interception-route-rewrite.js).
This reverts commit 2524a27.
4332d7c to
e2698a4
Compare
lukesandberg
pushed a commit
that referenced
this pull request
Mar 4, 2026
## Summary Follow-up to #90514 addressing review feedback from @lukesandberg: - **Extract webpack layer helpers to `webpack-layer.ts`**: Moves `shouldUseReactServerCondition` and `isWebpackAppPagesLayer` out of the large `utils.ts` into their own module, reducing transitive dependencies pulled into `swc/options.ts` (reverts the revert from the previous PR) - **Restore top-level import of `throwTurbopackInternalError`**: The lazy `require()` in `swc/index.ts` was unnecessary since `createProject` is always called — restores the simpler top-level import - **Remove dead `getSupportedBrowsers` re-export from `utils.ts`**: All importers already import directly from `get-supported-browsers.ts`, so the re-export was unused - **Extract `formatIssue` and `isRelevantWarning` to `format-issue.ts`**: Moves these functions (and their private helpers) out of the large `turbopack/utils.ts` into a dedicated module, so `print-build-errors.ts` doesn't pull in all of `turbopack/utils` ## Test plan - `pnpm --filter=next types` passes - Unit tests for `formatIssue` pass (`utils.test.ts` updated to import from new module) - NFT test expectations updated for the changed module graph
sokra
added a commit
that referenced
this pull request
Mar 6, 2026
## Summary Follow-up to #90514 addressing review feedback from @lukesandberg: - **Extract webpack layer helpers to `webpack-layer.ts`**: Moves `shouldUseReactServerCondition` and `isWebpackAppPagesLayer` out of the large `utils.ts` into their own module, reducing transitive dependencies pulled into `swc/options.ts` (reverts the revert from the previous PR) - **Restore top-level import of `throwTurbopackInternalError`**: The lazy `require()` in `swc/index.ts` was unnecessary since `createProject` is always called — restores the simpler top-level import - **Remove dead `getSupportedBrowsers` re-export from `utils.ts`**: All importers already import directly from `get-supported-browsers.ts`, so the re-export was unused - **Extract `formatIssue` and `isRelevantWarning` to `format-issue.ts`**: Moves these functions (and their private helpers) out of the large `turbopack/utils.ts` into a dedicated module, so `print-build-errors.ts` doesn't pull in all of `turbopack/utils` ## Test plan - `pnpm --filter=next types` passes - Unit tests for `formatIssue` pass (`utils.test.ts` updated to import from new module) - NFT test expectations updated for the changed module graph
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.


What?
No changes in functionality. Just skips requiring modules that are not used in the common hot path of builds.