Skip to content

Commit

Permalink
Remove custom handling for prebundled react env (vercel#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: vercel#49169
Fixes: vercel#49753
x-ref: vercel#48948
  • Loading branch information
ijjk authored and hydRAnger committed Jun 12, 2023
1 parent b9dc647 commit fa8a823
Showing 1 changed file with 0 additions and 17 deletions.
17 changes: 0 additions & 17 deletions packages/next/src/build/index.ts
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 fa8a823

Please sign in to comment.