Issue
I have configured source maps to work in Sentry but the files are now publicly available and I can see the source code in the browser's developer tools.
Applies To
- All SaaS Customers
- JavaScript-based SDKs
Resolution
After you upload the source maps to Sentry the files do no need to be made public. If you are using one of our Bundle plugins you can set the
filesToDeleteAfterUpload
option to delete source maps. The documentation for this option is available on this page. For example:sentryWebpackPlugin({
org: ...,
project: ...",
sourcemaps:{
assets: "./build/*",
// A glob or an array of globs that specifies the build artifacts
// that should be deleted after the artifact upload to
// Sentry has been completed.
filesToDeleteAfterUpload: "*.map"
},
//... other settings
}),
If you are using other tools to upload the source maps, you can manually delete the source map files before deploying them to production.