-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
Labels
Description
Description
As raised through #13270, asset detection for sourcemap upload in Next.js doesn't work on Windows.
After some research we found that it is likely due to the glob library, not allowing \ characters except for escaping and us passing in globs with actual backslashes:
sentry-javascript/packages/nextjs/src/config/webpackPluginOptions.ts
Lines 24 to 35 in b17ac59
sourcemapUploadAssets.push( path.join(distDirAbsPath, 'server', '**'), // This is normally where Next.js outputs things path.join(distDirAbsPath, 'serverless', '**'), // This was the output location for serverless Next.js ); } else { if (sentryBuildOptions.widenClientFileUpload) { sourcemapUploadAssets.push(path.join(distDirAbsPath, 'static', 'chunks', '**')); } else { sourcemapUploadAssets.push( path.join(distDirAbsPath, 'static', 'chunks', 'pages', '**'), path.join(distDirAbsPath, 'static', 'chunks', 'app', '**'), ); - https://github.com/getsentry/sentry-javascript-bundler-plugins/blob/95fe7e0b86a7987d0c162abecc515e7021a387ce/packages/bundler-plugin-core/src/debug-id-upload.ts#L81 (here we should probably use
windowsPathsNoEscapein the case we are autodetecting, because we are exclusively passing absolute paths to glob)
kupi-david
Metadata
Metadata
Assignees
Labels
Projects
Status
Waiting for: Community