Skip to content

Commit

Permalink
Merge branch 'canary' into bugfix/middleware-labels
Browse files Browse the repository at this point in the history
  • Loading branch information
kodiakhq[bot] authored Oct 24, 2021
2 parents a4c9465 + 3bb098f commit 807d82f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,10 @@ export async function getNotFoundError(
.map(({ origin }) =>
origin.readableIdentifier(compilation.requestShortener)
)
.filter((name) => name && !name.includes('next-client-pages-loader.js'))
.filter(
(name) =>
name && !/next-(middleware|client-pages)-loader\.js/.test(name)
)
if (moduleTrace.length === 0) return ''

return `\nImport trace for requested module:\n${moduleTrace.join(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ function formatMessage(message, verbose) {
const filteredModuleTrace =
message.moduleTrace &&
message.moduleTrace.filter(
(trace) => !trace.originName.includes('next-client-pages-loader.js')
(trace) =>
!/next-(middleware|client-pages)-loader\.js/.test(trace.originName)
)
message =
(message.moduleName ? stripAnsi(message.moduleName) + '\n' : '') +
Expand Down

0 comments on commit 807d82f

Please sign in to comment.