File tree Expand file tree Collapse file tree 3 files changed +5
-5
lines changed
packages/next/src/client/components/react-dev-overlay Expand file tree Collapse file tree 3 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -103,12 +103,12 @@ export function getOriginalStackFrames(
103
103
}
104
104
105
105
const webpackRegExes = [
106
- / ^ ( r s c : \/ \/ R e a c t \/ \w + \/ ) ? w e b p a c k - i n t e r n a l : \/ \/ \/ ( \. ) ? ( \( ( \w + ) \) ) ? / ,
106
+ / ^ ( r s c : \/ \/ R e a c t \/ [ ^ / ] + \/ ) ? w e b p a c k - i n t e r n a l : \/ \/ \/ ( \. ) ? ( \( ( \w + ) \) ) ? / ,
107
107
/ ^ ( w e b p a c k : \/ \/ \/ ( \. ) ? | w e b p a c k : \/ \/ ( _ N _ E \/ ) ? ) ( \( ( \w + ) \) ) ? / ,
108
108
]
109
109
110
110
const replacementRegExes = [
111
- / ^ ( r s c : \/ \/ R e a c t \/ \w + \/ ) / ,
111
+ / ^ ( r s c : \/ \/ R e a c t \/ [ ^ / ] + \/ ) / ,
112
112
/ ^ w e b p a c k - i n t e r n a l : \/ \/ \/ ( \. ) ? ( \( ( \w + ) \) ) ? / ,
113
113
/ ^ ( w e b p a c k : \/ \/ \/ ( \. ) ? | w e b p a c k : \/ \/ ( _ N _ E \/ ) ? ) ( \( ( \w + ) \) ) ? / ,
114
114
/ \? \d + $ / , // React's fakeFunctionIdx query param
Original file line number Diff line number Diff line change @@ -69,7 +69,7 @@ function createStackFrame(searchParams: URLSearchParams) {
69
69
70
70
// rsc://React/Server/file://<filename>?42 => file://<filename>
71
71
const file = fileParam
72
- . replace ( / ^ r s c : \/ \/ R e a c t \/ \w + \/ / , '' )
72
+ . replace ( / ^ r s c : \/ \/ R e a c t \/ [ ^ / ] + \/ / , '' )
73
73
. replace ( / \? \d + $ / , '' )
74
74
75
75
return {
Original file line number Diff line number Diff line change @@ -226,7 +226,7 @@ export async function getSource(
226
226
// webpack://_N_E/./src/hello.tsx => ./src/hello.tsx
227
227
const moduleId = filename
228
228
. replace (
229
- / ^ ( r s c : \/ \/ R e a c t \/ \w + \/ ) ? ( w e b p a c k - i n t e r n a l : \/ \/ \/ | w e b p a c k : \/ \/ ( _ N _ E \/ ) ? ) / ,
229
+ / ^ ( r s c : \/ \/ R e a c t \/ [ ^ / ] + \/ ) ? ( w e b p a c k - i n t e r n a l : \/ \/ \/ | w e b p a c k : \/ \/ ( _ N _ E \/ ) ? ) / ,
230
230
''
231
231
)
232
232
. replace ( / \? \d + $ / , '' )
@@ -277,7 +277,7 @@ export function getOverlayMiddleware(options: {
277
277
278
278
if (
279
279
! (
280
- / ^ ( r s c : \/ \/ R e a c t \/ \w + \/ ) ? ( w e b p a c k - i n t e r n a l : \/ \/ \/ | ( f i l e | w e b p a c k ) : \/ \/ ) / . test (
280
+ / ^ ( r s c : \/ \/ R e a c t \/ [ ^ / ] + \/ ) ? ( w e b p a c k - i n t e r n a l : \/ \/ \/ | ( f i l e | w e b p a c k ) : \/ \/ ) / . test (
281
281
frame . file
282
282
) && frame . lineNumber
283
283
)
You can’t perform that action at this time.
0 commit comments