Skip to content

Sourcemaps are broken on Next.js + Webpack 4 when auto wrapping instrumentation is enabled #6118

Closed
@lforst

Description

@lforst

When combining our Next.js auto wrapping of data-fetchers and API routes with webpack 4 the resolving of sourcemaps breaks and errors get resolved to the proxy modules we create.

Steps to reproduce

  1. Create Next.js 10 (has webpack 4 by default) or 11 app (need to set webpack5: false in Next.js config)
  2. Create API route
  3. Throw Error in API route
  4. Look at stack trace in Sentry
  5. Observe that it resolves to the proxy file we generate instead of to the source of the Error

Metadata

Metadata

Assignees

Labels

Package: nextjsIssues related to the Sentry Nextjs SDK

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions