Unverified Commit 040e4676 authored by Jiwon Choi's avatar Jiwon Choi Committed by GitHub

[sourcemaps] Always check for vendor chunks regardless of Node.js version (#83114)

This PR reverts https://github.com/vercel/next.js/pull/81619 as version
18 gating is no longer necessary.

---------
Co-authored-by: 's avatarSebastian "Sebbie" Silbermann <sebastian.silbermann@vercel.com>
parent a53d2b51
......@@ -6,7 +6,7 @@ function noSourceMap(): SourceMap | undefined {
}
// Edge runtime does not implement `module`
const nativeFindSourceMap =
const findSourceMap =
process.env.NEXT_RUNTIME === 'edge'
? noSourceMap
: (require('module') as typeof import('module')).findSourceMap
......@@ -104,13 +104,6 @@ export function findApplicableSourceMapPayload(
const didWarnAboutInvalidSourceMapDEV = new Set<string>()
const findSourceMap: (scriptNameOrSourceURL: string) => SourceMap | undefined =
process.env.NEXT_RUNTIME === 'nodejs' &&
process.versions.node?.startsWith('18')
? // Node.js 18 has a horribly slow `findSourceMap` implementation
noSourceMap
: nativeFindSourceMap
export function filterStackFrameDEV(
sourceURL: string,
functionName: string,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment