Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
N
next.js
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Alex
next.js
Commits
3625673e
Commit
3625673e
authored
Jul 10, 2025
by
RobPruzan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
debug
parent
eb506d6f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
1 deletion
+6
-1
source-map.ts
packages/next/src/server/dev/browser-logs/source-map.ts
+6
-1
No files found.
packages/next/src/server/dev/browser-logs/source-map.ts
View file @
3625673e
...
@@ -85,7 +85,7 @@ export function preprocessStackTrace(
...
@@ -85,7 +85,7 @@ export function preprocessStackTrace(
):
string
{
):
string
{
const
toForwardSlashes
=
(
p
:
string
)
=>
p
.
replace
(
/
\\
/g
,
'/'
)
const
toForwardSlashes
=
(
p
:
string
)
=>
p
.
replace
(
/
\\
/g
,
'/'
)
return
stackTrace
const
trace
=
stackTrace
.
split
(
'
\
n'
)
.
split
(
'
\
n'
)
.
map
((
line
)
=>
{
.
map
((
line
)
=>
{
const
match
=
line
.
match
(
/^
(\s
*at
\s
+.*
?)\s
+
\(([^
)
]
+
)\)
$/
)
const
match
=
line
.
match
(
/^
(\s
*at
\s
+.*
?)\s
+
\(([^
)
]
+
)\)
$/
)
...
@@ -110,6 +110,9 @@ export function preprocessStackTrace(
...
@@ -110,6 +110,9 @@ export function preprocessStackTrace(
return
line
return
line
})
})
.
join
(
'
\
n'
)
.
join
(
'
\
n'
)
console
.
log
(
'trace'
,
trace
)
return
trace
}
}
const
cache
=
new
LRUCache
<
const
cache
=
new
LRUCache
<
...
@@ -131,8 +134,10 @@ async function getSourceMappedStackFramesInternal(
...
@@ -131,8 +134,10 @@ async function getSourceMappedStackFramesInternal(
stack
:
stackTrace
,
stack
:
stackTrace
,
}
}
}
}
console
.
log
(
'frames'
,
frames
)
const
mappingResults
=
await
mapFramesUsingBundler
(
frames
,
ctx
)
const
mappingResults
=
await
mapFramesUsingBundler
(
frames
,
ctx
)
console
.
log
(
'results'
,
mappingResults
)
const
processedFrames
=
mappingResults
const
processedFrames
=
mappingResults
.
map
((
result
,
index
)
=>
({
.
map
((
result
,
index
)
=>
({
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment