Skip to content

Warning when using hideSourceMaps option in next.config.js #5449

Description

@simontaisne

Is there an existing issue for this?

How do you use Sentry?

Sentry Saas (sentry.io)

Which package are you using?

@sentry/nextjs

SDK Version

7.7.0

Framework Version

12.2.3

Link to Sentry event

No response

Steps to Reproduce

  1. Configure Sentry automatically with Next.js with the wizard
  2. Use hidden-source-map by setting the hideSourceMaps option in next.config.js
constmoduleExports={sentry: {hideSourceMaps: true,},};
  1. Run next dev to start Next.js in development mode

Expected Result

Run Next.js with Sentry without any warning.

Actual Result

Since the introduction of the next.config.js validation via ajv on version 12.2.3, the following warning is raised.

warn - Invalid next.config.js options detected: [
{
"instancePath": "",
"schemaPath": "#/additionalProperties",
"keyword": "additionalProperties",
"params": {
"additionalProperty": "sentry"
},
"message": "must NOT have additional properties"
}
] See more info here: https://nextjs.org/docs/messages/invalid-next-config

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions