Unverified Commit 1712abe1 authored by Hendrik Liebau's avatar Hendrik Liebau Committed by GitHub

Guard `createDebugChannel` import by feature flag (#84604)

We already do that for the initial load in `app-index.tsx` (via #83699), and should also do it for RSC requests.
parent 7453d200
......@@ -41,7 +41,10 @@ let createDebugChannel:
| typeof import('../../dev/debug-channel').createDebugChannel
| undefined
if (process.env.NODE_ENV !== 'production') {
if (
process.env.NODE_ENV !== 'production' &&
process.env.__NEXT_REACT_DEBUG_CHANNEL
) {
createDebugChannel = (
require('../../dev/debug-channel') as typeof import('../../dev/debug-channel')
).createDebugChannel
......
......@@ -65,7 +65,10 @@ let createDebugChannel:
| typeof import('../../../dev/debug-channel').createDebugChannel
| undefined
if (process.env.NODE_ENV !== 'production') {
if (
process.env.NODE_ENV !== 'production' &&
process.env.__NEXT_REACT_DEBUG_CHANNEL
) {
createDebugChannel = (
require('../../../dev/debug-channel') as typeof import('../../../dev/debug-channel')
).createDebugChannel
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment