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
c50641f7
Unverified
Commit
c50641f7
authored
Jan 18, 2023
by
Hannes Bornö
Committed by
GitHub
Jan 18, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove next-app-loader from import trace (#44996)
parent
27b95ffb
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
42 additions
and
1 deletion
+42
-1
parseNotFoundError.ts
...ack/plugins/wellknown-errors-plugin/parseNotFoundError.ts
+1
-1
ReactRefreshLogBox.test.ts
test/development/acceptance-app/ReactRefreshLogBox.test.ts
+30
-0
ReactRefreshLogBox.test.ts.snap
...eptance-app/__snapshots__/ReactRefreshLogBox.test.ts.snap
+11
-0
No files found.
packages/next/src/build/webpack/plugins/wellknown-errors-plugin/parseNotFoundError.ts
View file @
c50641f7
...
...
@@ -86,7 +86,7 @@ export async function getNotFoundError(
.
filter
(
(
name
)
=>
name
&&
!
/next-
(
middleware|client-pages|flight-
(
client|server|client-entry
))
-loader
\.
js/
.
test
(
!
/next-
(
app|
middleware|client-pages|flight-
(
client|server|client-entry
))
-loader
\.
js/
.
test
(
name
)
)
...
...
test/development/acceptance-app/ReactRefreshLogBox.test.ts
View file @
c50641f7
...
...
@@ -1365,5 +1365,35 @@ for (const variant of ['default', 'turbo']) {
await
cleanup
()
})
test
(
'Import trace when module not found in layout'
,
async
()
=>
{
const
{
session
,
cleanup
}
=
await
sandbox
(
next
,
new
Map
([[
'app/module.js'
,
`import "non-existing-module"`
]])
)
await
session
.
patch
(
'app/layout.js'
,
`
import "./module"
export default function RootLayout({ children }) {
return (
<html>
<head></head>
<body>{children}</body>
</html>
)
}
`
)
expect
(
await
session
.
hasRedbox
(
true
)).
toBe
(
true
)
expect
(
await
session
.
getRedboxSource
()).
toMatchSnapshot
()
await
cleanup
()
})
})
}
test/development/acceptance-app/__snapshots__/ReactRefreshLogBox.test.ts.snap
View file @
c50641f7
...
...
@@ -6,6 +6,17 @@ exports[`ReactRefreshLogBox app default Hydration errors should get error link 1
See more info here: https://nextjs.org/docs/messages/react-hydration-error"
`;
exports[`ReactRefreshLogBox app default Import trace when module not found in layout 1`] = `
"./app/module.js:1:0
Module not found: Can't resolve 'non-existing-module'
> 1 | import \\"non-existing-module\\"
Import trace for requested module:
./app/layout.js
https://nextjs.org/docs/messages/module-not-found"
`;
exports[`ReactRefreshLogBox app default Should not show __webpack_exports__ when exporting anonymous arrow function 1`] = `
"index.js (4:16) @ default
...
...
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