File tree Expand file tree Collapse file tree 1 file changed +4
-0
lines changed
packages/nextjs/src/client Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -14,10 +14,14 @@ export const nextjsClientStackFrameNormalizationIntegration = defineIntegration(
14
14
}
15
15
16
16
if ( assetPrefix ) {
17
+ // If the user defined an asset prefix, we need to strip it so that we can match it with uploaded sourcemaps.
18
+ // assetPrefix always takes priority over basePath.
17
19
if ( frame . filename ?. startsWith ( assetPrefix ) ) {
18
20
frame . filename = frame . filename . replace ( assetPrefix , 'app://' ) ;
19
21
}
20
22
} else if ( basePath ) {
23
+ // If the user defined a base path, we need to strip it to match with uploaded sourcemaps.
24
+ // We should only do this for same-origin filenames though, so that third party assets are not rewritten.
21
25
try {
22
26
const { origin : frameOrigin } = new URL ( frame . filename as string ) ;
23
27
if ( frameOrigin === windowOrigin ) {
You can’t perform that action at this time.
0 commit comments