提交 9bd88e4b 编写于 作者: fxy060608's avatar fxy060608

wip(uts): sourcemap

上级 ba6a8585
...@@ -3880,7 +3880,7 @@ function utsStracktraceyPreset(opts) { ...@@ -3880,7 +3880,7 @@ function utsStracktraceyPreset(opts) {
callee: '', callee: '',
index: false, index: false,
native: false, native: false,
file: nixSlashes(matches[1].replace('//?', '')), file: nixSlashes(matches[1]),
line: parseInt(matches[2]), line: parseInt(matches[2]),
column: parseInt(matches[3]), column: parseInt(matches[3]),
fileName, fileName,
...@@ -3903,7 +3903,7 @@ function utsStracktraceyPreset(opts) { ...@@ -3903,7 +3903,7 @@ function utsStracktraceyPreset(opts) {
if (item === '%StacktraceyItem%') { if (item === '%StacktraceyItem%') {
const _stack = stack.items.shift(); const _stack = stack.items.shift();
if (_stack) { if (_stack) {
return `at ${nixSlashes(path__default["default"].relative(inputRoot, _stack.file))}:${_stack.line}:${_stack.column} return `at ${nixSlashes(path__default["default"].relative(inputRoot, _stack.file.replace('\\\\?\\', '')))}:${_stack.line}:${_stack.column}
${_stack.errMsg}`; ${_stack.errMsg}`;
} }
} }
......
...@@ -3874,7 +3874,7 @@ function utsStracktraceyPreset(opts) { ...@@ -3874,7 +3874,7 @@ function utsStracktraceyPreset(opts) {
callee: '', callee: '',
index: false, index: false,
native: false, native: false,
file: nixSlashes(matches[1].replace('//?', '')), file: nixSlashes(matches[1]),
line: parseInt(matches[2]), line: parseInt(matches[2]),
column: parseInt(matches[3]), column: parseInt(matches[3]),
fileName, fileName,
...@@ -3897,7 +3897,7 @@ function utsStracktraceyPreset(opts) { ...@@ -3897,7 +3897,7 @@ function utsStracktraceyPreset(opts) {
if (item === '%StacktraceyItem%') { if (item === '%StacktraceyItem%') {
const _stack = stack.items.shift(); const _stack = stack.items.shift();
if (_stack) { if (_stack) {
return `at ${nixSlashes(path.relative(inputRoot, _stack.file))}:${_stack.line}:${_stack.column} return `at ${nixSlashes(path.relative(inputRoot, _stack.file.replace('\\\\?\\', '')))}:${_stack.line}:${_stack.column}
${_stack.errMsg}`; ${_stack.errMsg}`;
} }
} }
......
...@@ -455,7 +455,7 @@ export function utsStracktraceyPreset( ...@@ -455,7 +455,7 @@ export function utsStracktraceyPreset(
callee: '', callee: '',
index: false, index: false,
native: false, native: false,
file: nixSlashes(matches[1].replace('//?', '')), file: nixSlashes(matches[1]),
line: parseInt(matches[2]), line: parseInt(matches[2]),
column: parseInt(matches[3]), column: parseInt(matches[3]),
fileName, fileName,
...@@ -479,9 +479,9 @@ export function utsStracktraceyPreset( ...@@ -479,9 +479,9 @@ export function utsStracktraceyPreset(
if (item === '%StacktraceyItem%') { if (item === '%StacktraceyItem%') {
const _stack = stack.items.shift() const _stack = stack.items.shift()
if (_stack) { if (_stack) {
return `at ${nixSlashes(path.relative(inputRoot, _stack.file))}:${ return `at ${nixSlashes(
_stack.line path.relative(inputRoot, _stack.file.replace('\\\\?\\', ''))
}:${_stack.column} )}:${_stack.line}:${_stack.column}
${_stack.errMsg}` ${_stack.errMsg}`
} }
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册