Skip to content

Commit

Permalink
Remove custom handling for prebundled react env (#49954)
Browse files Browse the repository at this point in the history
This removes the previous handling for the prebundled react env we were
setting in favor of vercel/vercel#9974

We need to wait to land this until
vercel/vercel#9974 has been rolled

Fixes: #49169
Fixes: #49753
x-ref: #48948
  • Loading branch information
ijjk authored May 18, 2023
1 parent c2da56e commit ea9b1f5
Showing 1 changed file with 0 additions and 17 deletions.
17 changes: 0 additions & 17 deletions packages/next/src/build/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down

0 comments on commit ea9b1f5

Please sign in to comment.