Unverified Commit 94ef4806 authored by Jiachi Liu's avatar Jiachi Liu Committed by GitHub

[chore] remove unused __NEXT_PRIVATE_RUNTIME_TYPE (#78230)

parent f5444a16
...@@ -111,16 +111,9 @@ export async function requirePage( ...@@ -111,16 +111,9 @@ export async function requirePage(
}) })
} }
// since require is synchronous we can set the specific runtime const mod = process.env.NEXT_MINIMAL
// we are requiring for the require-hook and then clear after ? // @ts-ignore
try { __non_webpack_require__(pagePath)
process.env.__NEXT_PRIVATE_RUNTIME_TYPE = isAppPath ? 'app' : 'pages' : require(pagePath)
const mod = process.env.NEXT_MINIMAL return mod
? // @ts-ignore
__non_webpack_require__(pagePath)
: require(pagePath)
return mod
} finally {
process.env.__NEXT_PRIVATE_RUNTIME_TYPE = ''
}
} }
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