Unverified Commit ea9b1f5e authored by JJ Kasper's avatar JJ Kasper Committed by GitHub

Remove custom handling for prebundled react env (#49954)

This removes the previous handling for the prebundled react env we were
setting in favor of https://github.com/vercel/vercel/pull/9974

We need to wait to land this until
https://github.com/vercel/vercel/pull/9974 has been rolled

Fixes: https://github.com/vercel/next.js/issues/49169
Fixes: https://github.com/vercel/next.js/issues/49753
x-ref: https://github.com/vercel/next.js/issues/48948
parent c2da56e1
......@@ -301,23 +301,6 @@ export default async function build(
NextBuildContext.appDir = appDir
hasAppDir = Boolean(appDir)
if (isAppDirEnabled && hasAppDir) {
if (
(!process.env.__NEXT_TEST_MODE ||
process.env.__NEXT_TEST_MODE === 'e2e') &&
ciEnvironment.hasNextSupport
) {
const requireHook = require.resolve('../server/require-hook')
const contents = await promises.readFile(requireHook, 'utf8')
await promises.writeFile(
requireHook,
`process.env.__NEXT_PRIVATE_PREBUNDLED_REACT = '${
config.experimental.serverActions ? 'experimental' : 'next'
}'\n${contents}`
)
}
}
const isSrcDir = path
.relative(dir, pagesDir || appDir || '')
.startsWith('src')
......
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