Skip to content

NextJS 11 withSentryConfig returns a function when it should return an object #3722

Closed
@tm1000

Description

@tm1000

Package + Version

  • @sentry/browser
  • @sentry/node
  • raven-js
  • raven-node (raven for node)
  • other: @sentry/nextjs

Version:

6.7.2

Description

Utilizing https://docs.sentry.io/platforms/javascript/guides/nextjs/manual-setup/ withSentryConfig is returned directly into module.exports. However it's a function at this level and needs to be executed when sent to module.exports to actually send the settings to NextJS. Otherwise it's just a function that nextjs never exports. This actually ends up breaking any settings anyone has added in Next.config.js because once withSentryConfig does this then nextjs sees theres no webpack key on the object sent to module.exports

Metadata

Metadata

Assignees

No one assigned

    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