Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
N
next.js
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Alex
next.js
Commits
dcd0a600
Unverified
Commit
dcd0a600
authored
Dec 01, 2025
by
Jiachi Liu
Committed by
GitHub
Dec 01, 2025
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[devtool] unify the bundler field (#86514)
parent
261614d9
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
26 additions
and
196 deletions
+26
-196
route-info.tsx
.../errors/dev-tools-indicator/dev-tools-info/route-info.tsx
+0
-2
turbopack-info.tsx
...ors/dev-tools-indicator/dev-tools-info/turbopack-info.tsx
+0
-159
error-overlay-nav.tsx
...components/errors/error-overlay-nav/error-overlay-nav.tsx
+2
-2
context.tsx
packages/next/src/next-devtools/dev-overlay/menu/context.tsx
+0
-1
panel-router.css
.../next/src/next-devtools/dev-overlay/menu/panel-router.css
+5
-0
panel-router.tsx
.../next/src/next-devtools/dev-overlay/menu/panel-router.tsx
+13
-24
component-styles.tsx
...src/next-devtools/dev-overlay/styles/component-styles.tsx
+0
-4
index.test.ts
test/development/client-dev-overlay/index.test.ts
+6
-4
No files found.
packages/next/src/next-devtools/dev-overlay/components/errors/dev-tools-indicator/dev-tools-info/route-info.tsx
View file @
dcd0a600
...
@@ -128,5 +128,3 @@ export function RouteInfoBody({
...
@@ -128,5 +128,3 @@ export function RouteInfoBody({
<
DynamicRouteContent
routerType=
{
routerType
}
{
...
props
}
/>
<
DynamicRouteContent
routerType=
{
routerType
}
{
...
props
}
/>
)
)
}
}
export
const
DEV_TOOLS_INFO_ROUTE_INFO_STYLES
=
``
packages/next/src/next-devtools/dev-overlay/components/errors/dev-tools-indicator/dev-tools-info/turbopack-info.tsx
deleted
100644 → 0
View file @
261614d9
import
{
CopyButton
}
from
'../../../copy-button'
export
function
TurbopackInfoBody
(
props
:
React
.
ComponentProps
<
'div'
>
)
{
return
(
<>
<
article
className=
"dev-tools-info-article"
{
...
props
}
>
<
p
className=
"dev-tools-info-paragraph"
>
Turbopack is an incremental bundler optimized for JavaScript and
TypeScript, written in Rust, and built into Next.js. Turbopack can be
used in Next.js in both the
{
' '
}
<
code
className=
"dev-tools-info-code"
>
pages
</
code
>
and
{
' '
}
<
code
className=
"dev-tools-info-code"
>
app
</
code
>
directories for
faster local development.
</
p
>
<
p
className=
"dev-tools-info-paragraph"
>
To enable Turbopack, use the
{
' '
}
<
code
className=
"dev-tools-info-code"
>
--turbopack
</
code
>
flag when
running the Next.js development server.
</
p
>
</
article
>
<
div
className=
"dev-tools-info-code-block-container"
>
<
div
className=
"dev-tools-info-code-block"
>
<
CopyButton
actionLabel=
"Copy Next.js Turbopack Command"
successLabel=
"Next.js Turbopack Command Copied"
content=
{
'--turbopack'
}
className=
"dev-tools-info-copy-button"
/>
<
pre
className=
"dev-tools-info-code-block-pre"
>
<
code
>
<
div
className=
"dev-tools-info-code-block-line"
>
{
' '
}
</
div
>
<
div
className=
"dev-tools-info-code-block-line"
>
{
'{'
}<
/
div
>
<
div
className=
"dev-tools-info-code-block-line"
>
{
' '
}
<
span
className=
"dev-tools-info-code-block-json-key"
>
"scripts"
</
span
>
:
{
'{'
}
<
/
div
>
<
div
className=
"dev-tools-info-code-block-line dev-tools-info-highlight"
>
{
' '
}
<
span
className=
"dev-tools-info-code-block-json-key"
>
"dev"
</
span
>
:
{
' '
}
<
span
className=
"dev-tools-info-code-block-json-value"
>
"next dev --turbopack"
</
span
>
,
</
div
>
<
div
className=
"dev-tools-info-code-block-line"
>
{
' '
}
<
span
className=
"dev-tools-info-code-block-json-key"
>
"build"
</
span
>
:
{
' '
}
<
span
className=
"dev-tools-info-code-block-json-value"
>
"next build"
</
span
>
,
</
div
>
<
div
className=
"dev-tools-info-code-block-line"
>
{
' '
}
<
span
className=
"dev-tools-info-code-block-json-key"
>
"start"
</
span
>
:
{
' '
}
<
span
className=
"dev-tools-info-code-block-json-value"
>
"next start"
</
span
>
,
</
div
>
<
div
className=
"dev-tools-info-code-block-line"
>
{
' '
}
<
span
className=
"dev-tools-info-code-block-json-key"
>
"lint"
</
span
>
:
{
' '
}
<
span
className=
"dev-tools-info-code-block-json-value"
>
"next lint"
</
span
>
</
div
>
<
div
className=
"dev-tools-info-code-block-line"
>
{
'
}
'
}
</
div
>
<
div
className=
"dev-tools-info-code-block-line"
>
{
'
}
'
}
</
div
>
<
div
className=
"dev-tools-info-code-block-line"
>
{
' '
}
</
div
>
</
code
>
</
pre
>
</
div
>
</
div
>
</>
)
}
export
const
DEV_TOOLS_INFO_TURBOPACK_INFO_STYLES
=
`
.dev-tools-info-code {
background: var(--color-gray-400);
color: var(--color-gray-1000);
font-family: var(--font-stack-monospace);
padding: 2px 4px;
margin: 0;
font-size: var(--size-13);
white-space: break-spaces;
border-radius: var(--rounded-md-2);
}
.dev-tools-info-code-block-container {
padding: 6px;
}
.dev-tools-info-code-block {
position: relative;
background: var(--color-background-200);
border: 1px solid var(--color-gray-alpha-400);
border-radius: var(--rounded-md-2);
min-width: 326px;
}
.dev-tools-info-code-block-pre {
margin: 0;
font-family: var(--font-stack-monospace);
font-size: var(--size-12);
}
.dev-tools-info-copy-button {
position: absolute;
display: flex;
justify-content: center;
align-items: center;
right: 8px;
top: 8px;
padding: 4px;
height: var(--size-24);
width: var(--size-24);
border-radius: var(--rounded-md-2);
border: 1px solid var(--color-gray-alpha-400);
background: var(--color-background-100);
}
.dev-tools-info-code-block-line {
display: block;
line-height: 1.5;
padding: 0 16px;
}
.dev-tools-info-code-block-line.dev-tools-info-highlight {
border-left: 2px solid var(--color-blue-900);
background: var(--color-blue-400);
}
.dev-tools-info-code-block-json-key {
color: var(--color-syntax-keyword);
}
.dev-tools-info-code-block-json-value {
color: var(--color-syntax-link);
}
`
packages/next/src/next-devtools/dev-overlay/components/errors/error-overlay-nav/error-overlay-nav.tsx
View file @
dcd0a600
...
@@ -18,9 +18,9 @@ export function ErrorOverlayNav({
...
@@ -18,9 +18,9 @@ export function ErrorOverlayNav({
setActiveIndex
,
setActiveIndex
,
versionInfo
,
versionInfo
,
}:
ErrorOverlayNavProps
)
{
}:
ErrorOverlayNavProps
)
{
const
bundlerName
=
(
process
.
env
.
__NEXT_BUNDLER
||
'Webpack'
)
as
const
bundlerName
=
(
process
.
env
.
__NEXT_BUNDLER
||
'Turbopack'
)
as
|
'Webpack'
|
'Turbopack'
|
'Turbopack'
|
'Webpack'
|
'Rspack'
|
'Rspack'
return
(
return
(
...
...
packages/next/src/next-devtools/dev-overlay/menu/context.tsx
View file @
dcd0a600
...
@@ -10,7 +10,6 @@ export type PanelStateKind =
...
@@ -10,7 +10,6 @@ export type PanelStateKind =
|
'route-type'
|
'route-type'
|
'segment-explorer'
|
'segment-explorer'
|
'panel-selector'
|
'panel-selector'
|
'turbo-info'
export
const
PanelRouterContext
=
createContext
<
{
export
const
PanelRouterContext
=
createContext
<
{
panel
:
PanelStateKind
|
null
panel
:
PanelStateKind
|
null
...
...
packages/next/src/next-devtools/dev-overlay/menu/panel-router.css
View file @
dcd0a600
...
@@ -17,3 +17,8 @@
...
@@ -17,3 +17,8 @@
opacity
:
var
(
--panel-opacity
);
opacity
:
var
(
--panel-opacity
);
transition
:
var
(
--panel-transition
);
transition
:
var
(
--panel-transition
);
}
}
.turbopack-upgrade-link
{
text-decoration
:
underline
;
font-weight
:
500
;
}
packages/next/src/next-devtools/dev-overlay/menu/panel-router.tsx
View file @
dcd0a600
...
@@ -6,7 +6,6 @@ import {
...
@@ -6,7 +6,6 @@ import {
RouteInfoBody
,
RouteInfoBody
,
}
from
'../components/errors/dev-tools-indicator/dev-tools-info/route-info'
}
from
'../components/errors/dev-tools-indicator/dev-tools-info/route-info'
import
{
PageSegmentTree
}
from
'../components/overview/segment-explorer'
import
{
PageSegmentTree
}
from
'../components/overview/segment-explorer'
import
{
TurbopackInfoBody
}
from
'../components/errors/dev-tools-indicator/dev-tools-info/turbopack-info'
import
{
DevToolsHeader
}
from
'../components/errors/dev-tools-indicator/dev-tools-info/dev-tools-header'
import
{
DevToolsHeader
}
from
'../components/errors/dev-tools-indicator/dev-tools-info/dev-tools-header'
import
{
useDelayedRender
}
from
'../hooks/use-delayed-render'
import
{
useDelayedRender
}
from
'../hooks/use-delayed-render'
import
{
import
{
...
@@ -82,15 +81,23 @@ const MenuPanel = () => {
...
@@ -82,15 +81,23 @@ const MenuPanel = () => {
!!
process
.
env
.
TURBOPACK
!!
process
.
env
.
TURBOPACK
?
{
?
{
title
:
'Turbopack is enabled.'
,
title
:
'Turbopack is enabled.'
,
label
:
'
Turbopack
'
,
label
:
'
Bundler
'
,
value
:
'
Enabled
'
,
value
:
'
Turbopack
'
,
}
}
:
{
:
{
title
:
title
:
'Learn about Turbopack and how to enable it in your application.'
,
'Learn about Turbopack and how to enable it in your application.'
,
label
:
'Try Turbopack'
,
label
:
'Bundler'
,
value
:
<
ChevronRight
/>,
value
:
(
onClick
:
()
=>
setPanel
(
'turbo-info'
),
<
a
href=
"https://nextjs.org/docs/app/api-reference/config/next-config-js/turbopack"
target=
"_blank"
rel=
"noreferrer noopener"
className=
"turbopack-upgrade-link"
>
{
process
.
env
.
__NEXT_BUNDLER
||
'Turbopack'
}
</
a
>
),
},
},
!!
process
.
env
.
__NEXT_CACHE_COMPONENTS
&&
{
!!
process
.
env
.
__NEXT_CACHE_COMPONENTS
&&
{
title
:
'Cache Components is enabled.'
,
title
:
'Cache Components is enabled.'
,
...
@@ -236,24 +243,6 @@ export const PanelRouter = () => {
...
@@ -236,24 +243,6 @@ export const PanelRouter = () => {
</
DynamicPanel
>
</
DynamicPanel
>
</
PanelRoute
>
</
PanelRoute
>
)
}
)
}
<
PanelRoute
name=
"turbo-info"
>
<
DynamicPanel
sharePanelSizeGlobally=
{
false
}
sizeConfig=
{
{
kind
:
'fixed'
,
height
:
470
/
state
.
scale
,
width
:
400
/
state
.
scale
,
}
}
closeOnClickOutside
header=
{
<
DevToolsHeader
title=
"Try Turbopack"
/>
}
>
<
div
className=
"panel-content"
>
<
TurbopackInfoBody
/>
<
InfoFooter
href=
"https://nextjs.org/docs/app/api-reference/turbopack"
/>
</
div
>
</
DynamicPanel
>
</
PanelRoute
>
</>
</>
)
)
}
}
...
...
packages/next/src/next-devtools/dev-overlay/styles/component-styles.tsx
View file @
dcd0a600
...
@@ -15,8 +15,6 @@ import { CALL_STACK_FRAME_STYLES } from '../components/call-stack-frame/call-sta
...
@@ -15,8 +15,6 @@ import { CALL_STACK_FRAME_STYLES } from '../components/call-stack-frame/call-sta
import
{
css
}
from
'../utils/css'
import
{
css
}
from
'../utils/css'
import
{
EDITOR_LINK_STYLES
}
from
'../components/terminal/editor-link'
import
{
EDITOR_LINK_STYLES
}
from
'../components/terminal/editor-link'
import
{
ENVIRONMENT_NAME_LABEL_STYLES
}
from
'../components/errors/environment-name-label/environment-name-label'
import
{
ENVIRONMENT_NAME_LABEL_STYLES
}
from
'../components/errors/environment-name-label/environment-name-label'
import
{
DEV_TOOLS_INFO_TURBOPACK_INFO_STYLES
}
from
'../components/errors/dev-tools-indicator/dev-tools-info/turbopack-info'
import
{
DEV_TOOLS_INFO_ROUTE_INFO_STYLES
}
from
'../components/errors/dev-tools-indicator/dev-tools-info/route-info'
import
{
DEV_TOOLS_INFO_USER_PREFERENCES_STYLES
}
from
'../components/errors/dev-tools-indicator/dev-tools-info/user-preferences'
import
{
DEV_TOOLS_INFO_USER_PREFERENCES_STYLES
}
from
'../components/errors/dev-tools-indicator/dev-tools-info/user-preferences'
import
{
FADER_STYLES
}
from
'../components/fader'
import
{
FADER_STYLES
}
from
'../components/fader'
import
{
CALL_STACK_STYLES
}
from
'../components/call-stack/call-stack'
import
{
CALL_STACK_STYLES
}
from
'../components/call-stack/call-stack'
...
@@ -43,8 +41,6 @@ export function ComponentStyles() {
...
@@ -43,8 +41,6 @@ export function ComponentStyles() {
${containerErrorStyles}
${containerErrorStyles}
${containerRuntimeErrorStyles}
${containerRuntimeErrorStyles}
${versionStaleness}
${versionStaleness}
${DEV_TOOLS_INFO_TURBOPACK_INFO_STYLES}
${DEV_TOOLS_INFO_ROUTE_INFO_STYLES}
${DEV_TOOLS_INFO_USER_PREFERENCES_STYLES}
${DEV_TOOLS_INFO_USER_PREFERENCES_STYLES}
${FADER_STYLES}
${FADER_STYLES}
${SHORTCUT_RECORDER_STYLES}
${SHORTCUT_RECORDER_STYLES}
...
...
test/development/client-dev-overlay/index.test.ts
View file @
dcd0a600
...
@@ -140,8 +140,8 @@ describe('client-dev-overlay', () => {
...
@@ -140,8 +140,8 @@ describe('client-dev-overlay', () => {
1
1
Route
Route
Static
Static
Bundler
Turbopack
Turbopack
Enabled
Preferences"
Preferences"
`
)
`
)
}
else
{
}
else
{
...
@@ -150,7 +150,8 @@ describe('client-dev-overlay', () => {
...
@@ -150,7 +150,8 @@ describe('client-dev-overlay', () => {
1
1
Route
Route
Static
Static
Try Turbopack
Bundler
Webpack
Preferences"
Preferences"
`
)
`
)
}
}
...
@@ -197,8 +198,8 @@ describe('client-dev-overlay with Cache Components', () => {
...
@@ -197,8 +198,8 @@ describe('client-dev-overlay with Cache Components', () => {
1
1
Route
Route
Static
Static
Bundler
Turbopack
Turbopack
Enabled
Cache Components
Cache Components
Enabled
Enabled
Preferences"
Preferences"
...
@@ -209,7 +210,8 @@ describe('client-dev-overlay with Cache Components', () => {
...
@@ -209,7 +210,8 @@ describe('client-dev-overlay with Cache Components', () => {
1
1
Route
Route
Static
Static
Try Turbopack
Bundler
Webpack
Cache Components
Cache Components
Enabled
Enabled
Preferences"
Preferences"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment