Skip to content

[devtools] add feature flag for new panel ui #80251

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

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions packages/next/src/build/define-env.ts
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,8 @@ export function getDefineEnv({
: {}),
'process.env.__NEXT_DEVTOOL_SEGMENT_EXPLORER':
config.experimental.devtoolSegmentExplorer ?? false,
'process.env.__NEXT_DEVTOOL_NEW_PANEL_UI':
config.experimental.devtoolNewPanelUI ?? false,

// The devtools need to know whether or not to show an option to clear the
// bundler cache. This option may be removed later once Turbopack's
Expand Down
1 change: 1 addition & 0 deletions packages/next/src/server/config-schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -500,6 +500,7 @@ export const configSchema: zod.ZodType<NextConfig> = z.lazy(() =>
.optional(),
globalNotFound: z.boolean().optional(),
devtoolSegmentExplorer: z.boolean().optional(),
devtoolNewPanelUI: z.boolean().optional(),
})
.optional(),
exportPathMap: z
Expand Down
7 changes: 6 additions & 1 deletion packages/next/src/server/config-shared.ts
Original file line number Diff line number Diff line change
Expand Up @@ -696,9 +696,14 @@ export interface ExperimentalConfig {
globalNotFound?: boolean

/**
* Enable segment viewer for the app directory in dev tool.
* Enable segment viewer for the app directory in Next.js DevTools.
*/
devtoolSegmentExplorer?: boolean

/**
* Enable new panel UI for the Next.js DevTools.
*/
devtoolNewPanelUI?: boolean
}

export type ExportPathMap = {
Expand Down
Loading