Skip to content

Commit 34de0f3

Browse files
committed
[dev-tools] add feature flag for new panel ui
1 parent 77c4546 commit 34de0f3

File tree

3 files changed

+10
-0
lines changed

3 files changed

+10
-0
lines changed

packages/next/src/build/define-env.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -289,6 +289,8 @@ export function getDefineEnv({
289289
: {}),
290290
'process.env.__NEXT_DEVTOOL_SEGMENT_EXPLORER':
291291
config.experimental.devtoolSegmentExplorer ?? false,
292+
'process.env.__NEXT_DEVTOOL_NEW_PANEL_UI':
293+
config.experimental.devtoolNewPanelUI ?? false,
292294

293295
// The devtools need to know whether or not to show an option to clear the
294296
// bundler cache. This option may be removed later once Turbopack's
@@ -304,6 +306,8 @@ export function getDefineEnv({
304306
// no-op that just restarts the development server.
305307
'process.env.__NEXT_BUNDLER_HAS_PERSISTENT_CACHE':
306308
!isTurbopack || (config.experimental.turbopackPersistentCaching ?? false),
309+
'process.env.__NEXT_TURBOPACK_PERSISTENT_CACHE':
310+
config.experimental.turbopackPersistentCaching ?? false,
307311
}
308312

309313
const userDefines = config.compiler?.define ?? {}

packages/next/src/server/config-schema.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -500,6 +500,7 @@ export const configSchema: zod.ZodType<NextConfig> = z.lazy(() =>
500500
.optional(),
501501
globalNotFound: z.boolean().optional(),
502502
devtoolSegmentExplorer: z.boolean().optional(),
503+
devtoolNewPanelUI: z.boolean().optional(),
503504
})
504505
.optional(),
505506
exportPathMap: z

packages/next/src/server/config-shared.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -699,6 +699,11 @@ export interface ExperimentalConfig {
699699
* Enable segment viewer for the app directory in dev tool.
700700
*/
701701
devtoolSegmentExplorer?: boolean
702+
703+
/**
704+
* Enable new panel UI for the dev tool.
705+
*/
706+
devtoolNewPanelUI?: boolean
702707
}
703708

704709
export type ExportPathMap = {

0 commit comments

Comments
 (0)