Skip to content

fix(cli): Delete Nuxt source maps after upload in the wizard - #2833

Open
msonnb wants to merge 2 commits into
mainfrom
ms/wizard-nuxt-delete-sourcemaps
Open

msonnb wants to merge 2 commits into
mainfrom
ms/wizard-nuxt-delete-sourcemaps

Conversation

@msonnb

@msonnb msonnb commented Dec 3, 2026 •

Copy link
Copy Markdown
Member

The Nuxt wizard leaves the app's client source maps in the public build output, so anyone can download them and read the app's client source.

The wizard sets sourcemap: { client: "hidden" }, because Nuxt turns client source maps off by default and Sentry needs them for readable browser stack traces. hidden only drops the sourceMappingURL comment. Nuxt still writes the .map files to .output/public/_nuxt/, next to the bundles. The Sentry Nuxt module treats maps the user turned on as the user's and keeps them after the upload. The codemod only wrote org and project, so nothing deleted them. Only the fallback snippet had a filesToDeleteAfterUpload glob.

Leaving client unset doesn't help with Nuxt, as it does with the Vite and webpack plugins: Nuxt sets the client value to false itself, and the SDK then turns no client maps on. The updated Nuxt docs keep client: "hidden" and recommend sourcemaps.delete: true.

delete: true also removes the server source maps, as the docs recommend.

The Nuxt wizard sets `sourcemap: { client: "hidden" }` so that the client
build has source maps to upload. The Sentry Nuxt module treats these maps
as the user's and keeps them in `.output/public`, where anyone can
download them. The codemod now also sets `sentry.sourcemaps.delete: true`
unless the config already sets it, and the fallback snippet replaces the
`filesToDeleteAfterUpload` glob, which is being deprecated.

`sourcemaps.delete` ships in `@sentry/nuxt` 11.18.0, so the wizard installs
`^11.18.0` and warns when the user keeps an older version.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@vercel

vercel Bot commented Dec 3, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
cli Ready Ready Preview Dec 3, 2026 10:06am UTC
1 Skipped Deployment
Project Deployment Actions Updated
sentry-local Skipped Skipped Dec 3, 2026 10:06am UTC

Request Review

Package managers already install the latest 11.x for ^11, and the other
wizards don't pin a minor version. The warning after the install still
covers users who keep a version older than 11.18.0.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@vercel
vercel Bot temporarily deployed to Preview – sentry-local December 3, 2026 10:06 Inactive
@msonnb
msonnb marked this pull request as ready for review December 3, 2026 14:25
@github-actions github-actions Bot added the risk: medium PR risk score: medium label Dec 3, 2026

This branch was successfully deployed

1 active and 1 inactive deployments
Preview – cli — d3a6243e Deployed Dec 3, 2026 by vercel[bot]
Preview – sentry-local — d3a6243e Deployed Dec 3, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk: medium PR risk score: medium

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant