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(
1414 }
1515
1616 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.
1719 if ( frame . filename ?. startsWith ( assetPrefix ) ) {
1820 frame . filename = frame . filename . replace ( assetPrefix , 'app://' ) ;
1921 }
2022 } 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.
2125 try {
2226 const { origin : frameOrigin } = new URL ( frame . filename as string ) ;
2327 if ( frameOrigin === windowOrigin ) {
You can’t perform that action at this time.
0 commit comments