Skip to content

Commit 416c095

Browse files
authored
fix(module-runner): incorrect column with sourcemapInterceptor: "prepareStackTrace" (#21562)
1 parent 59700ae commit 416c095

1 file changed

Lines changed: 1 addition & 10 deletions

File tree

packages/vite/src/module-runner/sourcemap/interceptor.ts

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -359,16 +359,7 @@ function wrapCallSite(frame: CallSite, state: State) {
359359
const source = frame.getFileName() || frame.getScriptNameOrSourceURL()
360360
if (source) {
361361
const line = frame.getLineNumber() as number
362-
let column = (frame.getColumnNumber() as number) - 1
363-
364-
// Fix position in Node where some (internal) code is prepended.
365-
// See https://github.com/evanw/node-source-map-support/issues/36
366-
// Header removed in node at ^10.16 || >=11.11.0
367-
// v11 is not an LTS candidate, we can just test the one version with it.
368-
// Test node versions for: 10.16-19, 10.20+, 12-19, 20-99, 100+, or 11.11
369-
const headerLength = 62
370-
if (line === 1 && column > headerLength && !frame.isEval())
371-
column -= headerLength
362+
const column = (frame.getColumnNumber() as number) - 1
372363

373364
const position = mapSourcePosition({
374365
name: null,

0 commit comments

Comments
 (0)