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
0b0d03a0
Unverified
Commit
0b0d03a0
authored
Jun 03, 2025
by
Jiachi Liu
Committed by
GitHub
Jun 03, 2025
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[chore] remove legacy useEarlyImport flag (#80112)
parent
cdb6d257
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
8 additions
and
32 deletions
+8
-32
entries.ts
packages/next/src/build/entries.ts
+0
-4
index.ts
...s/next/src/build/webpack/loaders/next-app-loader/index.ts
+8
-21
config-schema.ts
packages/next/src/server/config-schema.ts
+0
-1
config-shared.ts
packages/next/src/server/config-shared.ts
+0
-6
No files found.
packages/next/src/build/entries.ts
View file @
0b0d03a0
...
@@ -715,10 +715,6 @@ export async function createEntrypoints(
...
@@ -715,10 +715,6 @@ export async function createEntrypoints(
basePath
:
config
.
basePath
,
basePath
:
config
.
basePath
,
assetPrefix
:
config
.
assetPrefix
,
assetPrefix
:
config
.
assetPrefix
,
nextConfigOutput
:
config
.
output
,
nextConfigOutput
:
config
.
output
,
nextConfigExperimentalUseEarlyImport
:
config
.
experimental
.
useEarlyImport
?
true
:
undefined
,
preferredRegion
:
staticInfo
.
preferredRegion
,
preferredRegion
:
staticInfo
.
preferredRegion
,
middlewareConfig
:
encodeToBase64
(
staticInfo
.
middleware
||
{}),
middlewareConfig
:
encodeToBase64
(
staticInfo
.
middleware
||
{}),
isGlobalNotFoundEnabled
:
config
.
experimental
.
globalNotFound
isGlobalNotFoundEnabled
:
config
.
experimental
.
globalNotFound
...
...
packages/next/src/build/webpack/loaders/next-app-loader/index.ts
View file @
0b0d03a0
...
@@ -48,7 +48,6 @@ export type AppLoaderOptions = {
...
@@ -48,7 +48,6 @@ export type AppLoaderOptions = {
isDev
?:
true
isDev
?:
true
basePath
:
string
basePath
:
string
nextConfigOutput
?:
NextConfig
[
'output'
]
nextConfigOutput
?:
NextConfig
[
'output'
]
nextConfigExperimentalUseEarlyImport
?:
true
middlewareConfig
:
string
middlewareConfig
:
string
isGlobalNotFoundEnabled
:
true
|
undefined
isGlobalNotFoundEnabled
:
true
|
undefined
}
}
...
@@ -553,7 +552,6 @@ const nextAppLoader: AppLoader = async function nextAppLoader() {
...
@@ -553,7 +552,6 @@ const nextAppLoader: AppLoader = async function nextAppLoader() {
preferredRegion
,
preferredRegion
,
basePath
,
basePath
,
middlewareConfig
:
middlewareConfigBase64
,
middlewareConfig
:
middlewareConfigBase64
,
nextConfigExperimentalUseEarlyImport
,
}
=
loaderOptions
}
=
loaderOptions
const
isGlobalNotFoundEnabled
=
!!
loaderOptions
.
isGlobalNotFoundEnabled
const
isGlobalNotFoundEnabled
=
!!
loaderOptions
.
isGlobalNotFoundEnabled
...
@@ -839,19 +837,8 @@ const nextAppLoader: AppLoader = async function nextAppLoader() {
...
@@ -839,19 +837,8 @@ const nextAppLoader: AppLoader = async function nextAppLoader() {
}
}
)
)
const header =
// Lazily evaluate the imported modules in the generated code
nextConfigExperimentalUseEarlyImport &&
const header = collectedDeclarations
process.env.NODE_ENV === 'production'
? // Evaluate the imported modules early in the generated code
collectedDeclarations
.map(([varName, modulePath]) => {
return `
import
*
as
$
{
varName
}
_
from
$
{
JSON
.
stringify
(
modulePath
)};
\
nconst
$
{
varName
}
=
()
=>
$
{
varName
}
_
;
\
n
`
})
.join('')
: // Lazily evaluate the imported modules in the generated code
collectedDeclarations
.map(([varName, modulePath]) => {
.map(([varName, modulePath]) => {
return `
const
$
{
varName
}
=
()
=>
import
(
/* webpackMode: "eager" */
$
{
JSON
.
stringify
(
return `
const
$
{
varName
}
=
()
=>
import
(
/* webpackMode: "eager" */
$
{
JSON
.
stringify
(
modulePath
modulePath
...
...
packages/next/src/server/config-schema.ts
View file @
0b0d03a0
...
@@ -468,7 +468,6 @@ export const configSchema: zod.ZodType<NextConfig> = z.lazy(() =>
...
@@ -468,7 +468,6 @@ export const configSchema: zod.ZodType<NextConfig> = z.lazy(() =>
serverSourceMaps
:
z
.
boolean
().
optional
(),
serverSourceMaps
:
z
.
boolean
().
optional
(),
useWasmBinary
:
z
.
boolean
().
optional
(),
useWasmBinary
:
z
.
boolean
().
optional
(),
useLightningcss
:
z
.
boolean
().
optional
(),
useLightningcss
:
z
.
boolean
().
optional
(),
useEarlyImport
:
z
.
boolean
().
optional
(),
testProxy
:
z
.
boolean
().
optional
(),
testProxy
:
z
.
boolean
().
optional
(),
defaultTestRunner
:
z
.
enum
(
SUPPORTED_TEST_RUNNERS_LIST
).
optional
(),
defaultTestRunner
:
z
.
enum
(
SUPPORTED_TEST_RUNNERS_LIST
).
optional
(),
allowDevelopmentBuild
:
z
.
literal
(
true
).
optional
(),
allowDevelopmentBuild
:
z
.
literal
(
true
).
optional
(),
...
...
packages/next/src/server/config-shared.ts
View file @
0b0d03a0
...
@@ -586,11 +586,6 @@ export interface ExperimentalConfig {
...
@@ -586,11 +586,6 @@ export interface ExperimentalConfig {
*/
*/
useLightningcss
?:
boolean
useLightningcss
?:
boolean
/**
* Enables early import feature for app router modules
*/
useEarlyImport
?:
boolean
/**
/**
* Enables view transitions by using the {@link https://github.com/facebook/react/pull/31975 unstable_ViewTransition} Component.
* Enables view transitions by using the {@link https://github.com/facebook/react/pull/31975 unstable_ViewTransition} Component.
*/
*/
...
@@ -1370,7 +1365,6 @@ export const defaultConfig = {
...
@@ -1370,7 +1365,6 @@ export const defaultConfig = {
webpackBuildWorker
:
undefined
,
webpackBuildWorker
:
undefined
,
webpackMemoryOptimizations
:
false
,
webpackMemoryOptimizations
:
false
,
optimizeServerReact
:
true
,
optimizeServerReact
:
true
,
useEarlyImport
:
false
,
viewTransition
:
false
,
viewTransition
:
false
,
routerBFCache
:
false
,
routerBFCache
:
false
,
removeUncaughtErrorAndRejectionListeners
:
false
,
removeUncaughtErrorAndRejectionListeners
:
false
,
...
...
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