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
e01eb0e0
Commit
e01eb0e0
authored
Apr 16, 2026
by
Janka Uryga
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
revert resource->pattern change
parent
b0a97c16
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
7 deletions
+5
-7
webpack-config.ts
packages/next/src/build/webpack-config.ts
+5
-7
No files found.
packages/next/src/build/webpack-config.ts
View file @
e01eb0e0
...
@@ -2869,14 +2869,12 @@ function getNextRootParamsRules({
...
@@ -2869,14 +2869,12 @@ function getNextRootParamsRules({
appDir
:
string
|
undefined
appDir
:
string
|
undefined
pageExtensions
:
string
[]
pageExtensions
:
string
[]
}):
webpack
.
RuleSetRule
[]
{
}):
webpack
.
RuleSetRule
[]
{
// Match resolved import of 'next/root-params'.
// Match resolved import of 'next/root-params'
// Use a regex (not an absolute path) so it works in isolated CI environments
const
nextRootParamsModule
=
path
.
join
(
NEXT_PROJECT_ROOT
,
'root-params.js'
)
// where the resolved path differs from the local build.
const
nextRootParamsModuleTest
=
/
[\\/]
next
[\\/]
root-params
\.
js$/
const
createInvalidImportRule
=
(
message
:
string
)
=>
{
const
createInvalidImportRule
=
(
message
:
string
)
=>
{
return
{
return
{
test
:
nextRootParamsModuleTest
,
resource
:
nextRootParamsModule
,
loader
:
'next-invalid-import-error-loader'
,
loader
:
'next-invalid-import-error-loader'
,
options
:
{
options
:
{
message
,
message
,
...
@@ -2909,7 +2907,7 @@ function getNextRootParamsRules({
...
@@ -2909,7 +2907,7 @@ function getNextRootParamsRules({
"'next/root-params' cannot be imported from a Client Component module. It should only be used from a Server Component."
"'next/root-params' cannot be imported from a Client Component module. It should only be used from a Server Component."
)
)
const
invalidNonAppServerImportRule
=
{
const
invalidNonAppServerImportRule
=
{
test
:
nextRootParamsModuleTest
,
resource
:
nextRootParamsModule
,
loader
:
'next-invalid-import-error-loader'
,
loader
:
'next-invalid-import-error-loader'
,
issuerLayer
:
{
issuerLayer
:
{
or
:
[
WEBPACK_LAYERS
.
instrument
,
WEBPACK_LAYERS
.
middleware
],
or
:
[
WEBPACK_LAYERS
.
instrument
,
WEBPACK_LAYERS
.
middleware
],
...
@@ -2929,7 +2927,7 @@ function getNextRootParamsRules({
...
@@ -2929,7 +2927,7 @@ function getNextRootParamsRules({
oneOf
:
[
oneOf
:
[
invalidNonAppServerImportRule
,
invalidNonAppServerImportRule
,
{
{
test
:
nextRootParamsModuleTest
,
resource
:
nextRootParamsModule
,
issuerLayer
:
shouldUseReactServerCondition
as
(
issuerLayer
:
shouldUseReactServerCondition
as
(
layer
:
string
layer
:
string
)
=>
boolean
,
)
=>
boolean
,
...
...
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