diff --git a/packages/next/src/build/webpack/config/blocks/base.ts b/packages/next/src/build/webpack/config/blocks/base.ts index d7b2ed0501668..e95ad5f1a3699 100644 --- a/packages/next/src/build/webpack/config/blocks/base.ts +++ b/packages/next/src/build/webpack/config/blocks/base.ts @@ -4,14 +4,7 @@ import { COMPILER_NAMES } from '../../../../shared/lib/constants' import type { ConfigurationContext } from '../utils' import DevToolsIgnorePlugin from '../../plugins/devtools-ignore-list-plugin' import EvalSourceMapDevToolPlugin from '../../plugins/eval-source-map-dev-tool-plugin' - -function shouldIgnorePath(modulePath: string): boolean { - return ( - modulePath.includes('node_modules') || - // Only relevant for when Next.js is symlinked e.g. in the Next.js monorepo - modulePath.includes('next/dist') - ) -} +import { shouldIgnorePath } from '../ignore-list' export const base = curry(function base( ctx: ConfigurationContext, diff --git a/packages/next/src/build/webpack/config/ignore-list.ts b/packages/next/src/build/webpack/config/ignore-list.ts new file mode 100644 index 0000000000000..266eccf10c2c6 --- /dev/null +++ b/packages/next/src/build/webpack/config/ignore-list.ts @@ -0,0 +1,7 @@ +export function shouldIgnorePath(modulePath: string): boolean { + return ( + modulePath.includes('node_modules') || + // Only relevant for when Next.js is symlinked e.g. in the Next.js monorepo + modulePath.includes('next/dist') + ) +} diff --git a/packages/next/src/client/components/react-dev-overlay/internal/container/RuntimeError/CallStackFrame.tsx b/packages/next/src/client/components/react-dev-overlay/internal/container/RuntimeError/CallStackFrame.tsx index 7a3f4e5c09075..d6afb06e61784 100644 --- a/packages/next/src/client/components/react-dev-overlay/internal/container/RuntimeError/CallStackFrame.tsx +++ b/packages/next/src/client/components/react-dev-overlay/internal/container/RuntimeError/CallStackFrame.tsx @@ -37,7 +37,7 @@ export const CallStackFrame: React.FC<{ return (