Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
N
next.js
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Alex
next.js
Commits
94ef4806
Unverified
Commit
94ef4806
authored
Apr 16, 2025
by
Jiachi Liu
Committed by
GitHub
Apr 16, 2025
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[chore] remove unused __NEXT_PRIVATE_RUNTIME_TYPE (#78230)
parent
f5444a16
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
12 deletions
+5
-12
require.ts
packages/next/src/server/require.ts
+5
-12
No files found.
packages/next/src/server/require.ts
View file @
94ef4806
...
@@ -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
=
''
}
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment