@@ -70,17 +70,17 @@ export function getBuildPluginOptions({
7070 if ( buildTool === 'webpack-nodejs' || buildTool === 'webpack-edge' ) {
7171 // Webpack server builds
7272 sourcemapUploadAssets . push (
73- path . posix . join ( distDirAbsPath , 'server' , '**' ) , // Standard output location for server builds
74- path . posix . join ( distDirAbsPath , 'serverless' , '**' ) , // Legacy output location for serverless Next.js
73+ path . posix . join ( normalizedDistDirAbsPath , 'server' , '**' ) , // Standard output location for server builds
74+ path . posix . join ( normalizedDistDirAbsPath , 'serverless' , '**' ) , // Legacy output location for serverless Next.js
7575 ) ;
7676 } else {
7777 // Webpack client builds
7878 if ( sentryBuildOptions . widenClientFileUpload ) {
79- sourcemapUploadAssets . push ( path . posix . join ( distDirAbsPath , 'static' , 'chunks' , '**' ) ) ;
79+ sourcemapUploadAssets . push ( path . posix . join ( normalizedDistDirAbsPath , 'static' , 'chunks' , '**' ) ) ;
8080 } else {
8181 sourcemapUploadAssets . push (
82- path . posix . join ( distDirAbsPath , 'static' , 'chunks' , 'pages' , '**' ) ,
83- path . posix . join ( distDirAbsPath , 'static' , 'chunks' , 'app' , '**' ) ,
82+ path . posix . join ( normalizedDistDirAbsPath , 'static' , 'chunks' , 'pages' , '**' ) ,
83+ path . posix . join ( normalizedDistDirAbsPath , 'static' , 'chunks' , 'app' , '**' ) ,
8484 ) ;
8585 }
8686
@@ -91,25 +91,25 @@ export function getBuildPluginOptions({
9191 // We only care to delete client bundle source maps because they would be the ones being served.
9292 // Removing the server source maps crashes Vercel builds for (thus far) unknown reasons:
9393 // https://github.com/getsentry/sentry-javascript/issues/13099
94- path . posix . join ( distDirAbsPath , 'static' , '**' , '*.js.map' ) ,
95- path . posix . join ( distDirAbsPath , 'static' , '**' , '*.mjs.map' ) ,
96- path . posix . join ( distDirAbsPath , 'static' , '**' , '*.cjs.map' ) ,
94+ path . posix . join ( normalizedDistDirAbsPath , 'static' , '**' , '*.js.map' ) ,
95+ path . posix . join ( normalizedDistDirAbsPath , 'static' , '**' , '*.mjs.map' ) ,
96+ path . posix . join ( normalizedDistDirAbsPath , 'static' , '**' , '*.cjs.map' ) ,
9797 ) ;
9898 }
9999 }
100100 }
101101
102102 // We want to include main-* files if widenClientFileUpload is true as they have proven to be useful
103103 if ( ! sentryBuildOptions . widenClientFileUpload ) {
104- sourcemapUploadIgnore . push ( path . posix . join ( distDirAbsPath , 'static' , 'chunks' , 'main-*' ) ) ;
104+ sourcemapUploadIgnore . push ( path . posix . join ( normalizedDistDirAbsPath , 'static' , 'chunks' , 'main-*' ) ) ;
105105 }
106106
107107 // Always ignore framework, polyfills, and webpack files
108108 sourcemapUploadIgnore . push (
109- path . posix . join ( distDirAbsPath , 'static' , 'chunks' , 'framework-*' ) ,
110- path . posix . join ( distDirAbsPath , 'static' , 'chunks' , 'framework.*' ) ,
111- path . posix . join ( distDirAbsPath , 'static' , 'chunks' , 'polyfills-*' ) ,
112- path . posix . join ( distDirAbsPath , 'static' , 'chunks' , 'webpack-*' ) ,
109+ path . posix . join ( normalizedDistDirAbsPath , 'static' , 'chunks' , 'framework-*' ) ,
110+ path . posix . join ( normalizedDistDirAbsPath , 'static' , 'chunks' , 'framework.*' ) ,
111+ path . posix . join ( normalizedDistDirAbsPath , 'static' , 'chunks' , 'polyfills-*' ) ,
112+ path . posix . join ( normalizedDistDirAbsPath , 'static' , 'chunks' , 'webpack-*' ) ,
113113 ) ;
114114
115115 // If the user has opted into using the experimental hook, we skip sourcemap uploads in the plugin
0 commit comments