Skip to content

productionBrowserSourceMaps: false is not working - a way to disable the sourcemaps #6031

Closed
@anonymouscatcher

Description

@anonymouscatcher

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

"@sentry/nextjs": "^7.16.0",

Framework Version

18

Link to Sentry event

No response

Steps to Reproduce

next.config.js


module.exports = {
  ...withSentryConfig(defaultConfig, sentryWebpackPluginOptions),
  productionBrowserSourceMaps: false
};

Expected Result

I'm looking for a way to disable sourcemaps in production, next js has an option to flag the source maps but it I don't know why sentry forces to enable and upload my source code, I just want a way to disable source map for security concerns. this shouldn't be too hard achieve since it's related to security and exposing source code to public. it's hours I'm looking for this to solve it.
Also something about hideSourceMaps option, I don't know what this supposed to do but I tried this feature as well and it still load my ***.js.map files in network tab and you can easily open any files you like in console tab.

Actual Result

.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions