Repository navigation
deleteSourcemapsAfterUpload: true does not delete .next/server/** source maps #19235
Description
Activity
Hi, there has been an issue with this previously so the source maps are not deleted anymore on the server: #13099
The paths can explicitly be set with an array of globs in
filesToDeleteAfterUpload. Make sure to enable hidden source maps (devtool = 'hidden-source-map') in case you want to delete them. Otherwise, asourceMappingUrlcomment is added to each file which will look for the source map source - and this leads to this error of not finding the source map.- moved this from Waiting for: Product Owner to No status in GitHub Issues with 👀 3
on Feb 10, 2026 @s1gr1d Thank you for the answer 😄 The Sentry docs state that the source maps are deleted to better the security, does keeping the source maps in the server folder impact the security, or is this point only relevant for the files the client loads?
6 remaining items
- moved this from Waiting for: Community to Waiting for: Product Owner in GitHub Issues with 👀 3
on Feb 12, 2026 @chargome Hey 😄 Ah, I see, thank you! Probably all good then. If we want to remove them, can I just do so after the
npm run buildhas finished? We probably will just keep them. Just thinking in terms of any kind of vulnerability or misconfiguration that could cause these files to be read by 3rd parties. I mean they would get the code anyway in that case, but it would be easier to read 😊Yes you can either use
filesToDeleteAfterUploadonce #19280 is released or just delete them yourself manually. And yes as you correctly pointed out it would require a separate vulnerability to access these files on server and then source maps for sure would not be your biggest concern 😄- moved this from Waiting for: Product Owner to No status in GitHub Issues with 👀 3
on Feb 12, 2026 @chargome Sounds good! Thanks for the great support! 😄
Reacted by rodolfoBee- moved this from Waiting for: Product Owner to No status in GitHub Issues with 👀 3
on Feb 13, 2026 - added a commit that references this issue
on Feb 13, 2026 - added a commit that references this issue
on Feb 20, 2026 github-actions commented
on Feb 24, 2026 on Feb 24, 2026 – with GitHub ActionsContributorMore actionsA PR closing this issue has just been released 🚀
This issue was referenced by PR #19280, which was included in the 10.40.0 release.
Metadata
Metadata
Assignees
Projects
- StatusShow more project fieldsNo status
Is there an existing issue for this?
How do you use Sentry?
Sentry Saas (sentry.io)
Which SDK are you using?
@sentry/nextjs
SDK Version
10.38.0
Framework Version
Link to Sentry event
No response
Reproduction Example/SDK Setup
No response
Steps to Reproduce
next.config.js:next buildExpected Result
All sourcemaps produced by the build are deleted after upload
Actual Result
Source maps in
.next/server/**are not deleted:Additional Context
Same issue as reported here for the CSS folder: #18125
Priority
React with 👍 to help prioritize this issue. Please use comments to provide useful context, avoiding
+1orme too, to help us triage it.