René's URL Explorer Experiment


Title: Bundler plugins should handle source maps without any user configuration · Issue #25609 · getsentry/sentry-javascript · GitHub

Open Graph Title: Bundler plugins should handle source maps without any user configuration · Issue #25609 · getsentry/sentry-javascript

X Title: Bundler plugins should handle source maps without any user configuration · Issue #25609 · getsentry/sentry-javascript

Description: Problem Setting up source map upload with the Sentry bundler plugins needs too much configuration, and most of it is about source maps that users do not want to ship. The current Vite docs example: import { defineConfig } from "vite"; im...

Open Graph Description: Problem Setting up source map upload with the Sentry bundler plugins needs too much configuration, and most of it is about source maps that users do not want to ship. The current Vite docs example:...

X Description: Problem Setting up source map upload with the Sentry bundler plugins needs too much configuration, and most of it is about source maps that users do not want to ship. The current Vite docs example:...

Opengraph URL: https://github.com/getsentry/sentry-javascript/issues/25609

X: @github

direct link

Domain: github.com

IPv4 address: 140.82.114.4


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Bundler plugins should handle source maps without any user configuration","articleBody":"## Problem\n\nSetting up source map upload with the Sentry bundler plugins needs too much configuration, and most of it is about source maps that users do not want to ship. The current Vite docs example:\n\n```ts\nimport { defineConfig } from \"vite\";\nimport { sentryVitePlugin } from \"@sentry/vite-plugin\";\n\nexport default defineConfig({\n  build: {\n    sourcemap: \"hidden\", // Source map generation must be turned on (\"hidden\", true, etc.)\n  },\n  plugins: [\n    sentryVitePlugin({\n      org: \"example-org\",\n      project: \"example-project\",\n      authToken: process.env.SENTRY_AUTH_TOKEN,\n      sourcemaps: {\n        // As you're enabling client source maps, you probably want to delete them after they're uploaded to Sentry.\n        // Set the appropriate glob pattern for your output folder - some glob examples below:\n        filesToDeleteAfterUpload: [\"./**/*.map\", \".*/**/public/**/*.map\", \"./dist/**/client/**/*.map\"],\n      },\n    }),\n  ],\n});\n```\n\nUsers have to know three things: that source maps must be turned on, that `hidden` is the right mode, and which glob matches their output folder. Wrong globs either leave maps in production or delete files that were never uploaded. \n\nThe plugins upload from disk after the bundler has written its output, then delete files that match the globs. The bundlers all expose the generated map to plugins before the write (`generateBundle` in Rollup, Rolldown and Vite, `processAssets` in webpack and Rspack), so the plugin does not need the map on disk at all.\n\n## Proposal\n\nAdd one option, `sourcemaps.deleteSourcemapsAfterUpload?: boolean`, default `undefined` (\"auto\"), and make the plugin handle the source map setting itself:\n\n| Bundler source map setting | `deleteSourcemapsAfterUpload` | Behaviour |\n|---|---|---|\n| unset | auto or `true` | Plugin turns on hidden maps, copies each chunk and its map from the bundler's pre-write hook into the temp upload folder, removes the `.map` asset so it is never written, uploads the temp folder. |\n| unset | `false` | Unchanged: setting untouched, no maps generated. |\n| `hidden` or `true` | auto | Unchanged: upload from disk, maps stay in the output, `filesToDeleteAfterUpload` still works. |\n| `hidden` or `true` | `true` | `true` is coerced to `hidden`. Maps are removed before write. |\n| `inline` | any | Warn. Nothing to delete. |\n| `false` | any | Warn that source maps are off. |\n\nRules:\n\n- The plugin only turns maps on when it will also remove them. `false` never adds maps to anyone's output.\n- The plugin only turns maps on when an upload can run (not `NODE_ENV=development`, `sourcemaps.disable` unset, auth token, org and project present). Builds without credentials behave as today.\n- For Rollup, Rolldown, Vite, webpack and Rspack the `.map` file is never written to the output directory. For esbuild, which has no pre-write hook, the plugin deletes the exact `.map` paths from esbuild's metafile after a successful upload.\n- Existing `filesToDeleteAfterUpload` globs keep working and are still useful for files the bundler did not produce.\n\n## What the docs become\n\n```ts\nimport { defineConfig } from \"vite\";\nimport { sentryVitePlugin } from \"@sentry/vite-plugin\";\n\nexport default defineConfig({\n  plugins: [\n    sentryVitePlugin({\n      org: \"example-org\",\n      project: \"example-project\",\n      authToken: process.env.SENTRY_AUTH_TOKEN,\n    }),\n  ],\n});\n```\n\nNo `build.sourcemap` line, no globs, no comment explaining either. The same applies to the Rollup, webpack, Rspack and esbuild pages. The \"delete source maps after upload\" docs section shrinks to one sentence: maps are uploaded and not shipped by default; set `sourcemaps.deleteSourcemapsAfterUpload: false` to keep them.\n\n## Backwards compatibility\n\n- Anyone who set `hidden` or `true` today sees no change.\n- Anyone with `sourcemap` unset and credentials configured gets maps uploaded where they got a \"no source maps found\" warning before. Their emitted JavaScript does not change and no `.map` file appears in their output.\n- The framework SDKs (Next.js, Nuxt, SvelteKit, Astro, Remix, SolidStart, TanStack Start, Gatsby) pass `deleteSourcemapsAfterUpload: false` in the first PR so their existing behaviour is untouched. Each SDK can then drop its own hidden-map and glob logic in a follow-up PR. Nitro, React Router and Next.js Turbopack upload outside the bundler and keep their current approach.\n\n## Implementation notes\n\n- The upload still goes through the Sentry CLI, which takes a directory, so the temp folder stays. Only the source of the bytes changes, from the output directory to the bundler's hook payload. Memory use does not grow because the bundler already holds every chunk and map for the hook.\n- Rollup and Rolldown: an `outputOptions` hook sets `sourcemap: 'hidden'` when unset; a second plugin object with `generateBundle` at `order: 'post'` stages the chunk and map and deletes the `.map` asset. Rolldown syncs asset deletion back to Rust.\n- Vite: a `config` hook sets `build.sourcemap: 'hidden'` when unset; the existing `enforce: 'post'` plugin does the staging after `vite:build-import-analysis` has rewritten the maps.\n- webpack and Rspack: `apply()` sets `devtool: 'hidden-source-map'` when unset; `processAssets` at `PROCESS_ASSETS_STAGE_REPORT + 1` stages the asset and its `related.sourceMap` and calls `compilation.deleteAsset`. Content hashes are unaffected because they are final by then.\n- Rollup 4.64.8 now includes the `sourceMappingURL` comment in chunk hashes, so the plugin must use the `hidden` mode rather than strip the comment itself.\n- Upstream, a native \"generate but do not emit\" source map mode would remove the need to force `hidden`. Rolldown, webpack and Rspack look receptive and Next.js has an open request for a hidden mode in Turbopack (vercel/next.js#84095). That is separate work and this change does not depend on it.","author":{"url":"https://github.com/timfish","@type":"Person","name":"timfish"},"datePublished":"2026-10-21T11:12:12Z","url":"https://github.com/getsentry/sentry-javascript/issues/25609"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:6e2c7cbc-3874-fa75-9556-545b137ba8a0
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idEC70:1F16DD:1ADF1:23F18:6B043008
html-safe-nonce5a9c8a675960063e139637fe5a089f21c454047d726847a38246ec0d2433257c
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFQzcwOjFGMTZERDoxQURGMToyM0YxODo2QjA0MzAwOCIsInZpc2l0b3JfaWQiOiI4NDkzMzg3MTM0ODkwNDIyMjgwIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmacd8b0ff939f1ed2f0df9f1daa94f5a1ae2bbebd623ab070ed91ac5dd0628f036a
hovercard-subject-tagissue:5959372655
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/getsentry/sentry-javascript/25609/issue_layout
twitter:imagehttps://opengraph.githubassets.com/a1c745342cccc91d882945575dfb287d07884fbecafac417c52c55fe552457a7/getsentry/sentry-javascript/issues/25609
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/a1c745342cccc91d882945575dfb287d07884fbecafac417c52c55fe552457a7/getsentry/sentry-javascript/issues/25609
og:image:altProblem Setting up source map upload with the Sentry bundler plugins needs too much configuration, and most of it is about source maps that users do not want to ship. The current Vite docs example:...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernametimfish
hostnamegithub.com
expected-hostnamegithub.com
Noneb7a1d2b9101496921b08579fbee988d014345aef2f5bd660d1f8c7332d81560e
turbo-cache-controlno-preview
go-importgithub.com/getsentry/sentry-javascript git https://github.com/getsentry/sentry-javascript.git
octolytics-dimension-user_id1396951
octolytics-dimension-user_logingetsentry
octolytics-dimension-repository_id3328572
octolytics-dimension-repository_nwogetsentry/sentry-javascript
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id3328572
octolytics-dimension-repository_network_root_nwogetsentry/sentry-javascript
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
releasec3dd496c3da6ea6b77e69c09279d2b81604654f1
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/getsentry/sentry-javascript/issues/25609#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgetsentry%2Fsentry-javascript%2Fissues%2F25609
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgetsentry%2Fsentry-javascript%2Fissues%2F25609
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=getsentry%2Fsentry-javascript
Reloadhttps://github.com/getsentry/sentry-javascript/issues/25609
Reloadhttps://github.com/getsentry/sentry-javascript/issues/25609
Reloadhttps://github.com/getsentry/sentry-javascript/issues/25609
getsentryhttps://github.com/getsentry
sentry-javascripthttps://github.com/getsentry/sentry-javascript
Codehttps://github.com/getsentry/sentry-javascript
Issues341 (341)https://github.com/getsentry/sentry-javascript/issues
Pull requests55 (55)https://github.com/getsentry/sentry-javascript/pulls
Discussionshttps://github.com/getsentry/sentry-javascript/discussions
Actionshttps://github.com/getsentry/sentry-javascript/actions
Security and quality7 (7)https://github.com/getsentry/sentry-javascript/security
Insightshttps://github.com/getsentry/sentry-javascript/insights
https://github.com/getsentry/sentry-javascript
New issuehttps://github.com/login?return_to=https://github.com/getsentry/sentry-javascript/issues/25609
New issuehttps://github.com/login?return_to=https://github.com/getsentry/sentry-javascript/issues/25609
Bundler plugins should handle source maps without any user configurationhttps://github.com/getsentry/sentry-javascript/issues/25609#top
Featurehttps://github.com/getsentry/sentry-javascript/issues?q=state%3Aopen%20label%3A%22Feature%22
https://github.com/timfish
timfishhttps://github.com/timfish
on Oct 21, 2026https://github.com/getsentry/sentry-javascript/issues/25609#issue-5959372655
Add option to hide sourcemaps for client side bundle vercel/next.js#84095https://github.com/vercel/next.js/issues/84095
https://github.com/apps/linear-code
linear-codehttps://github.com/apps/linear-code
on Oct 21, 2026https://github.com/getsentry/sentry-javascript/issues/25609#issuecomment-6314514456
Linear Codehttps://linear.app
JS-3980https://linear.app/getsentry/issue/JS-3980
linear-codehttps://github.com/apps/linear-code
Featurehttps://github.com/getsentry/sentry-javascript/issues?q=state%3Aopen%20label%3A%22Feature%22
on Oct 21, 2026https://github.com/getsentry/sentry-javascript/issues/25609#event-33838518758
timfishhttps://github.com/timfish
on Oct 29, 2026https://github.com/getsentry/sentry-javascript/issues/25609#event-34590973038
feat(bundler-plugins): Add `sourcemaps.deleteSourcemapsAfterUpload` a…https://github.com/getsentry/sentry-javascript/commit/0f28207b337adb81798bf3070a187e05c8c7616b
0f28207https://github.com/getsentry/sentry-javascript/commit/0f28207b337adb81798bf3070a187e05c8c7616b
timfishhttps://github.com/timfish
on Nov 6, 2026https://github.com/getsentry/sentry-javascript/issues/25609#event-35387802266
feat(bundler-plugins): Enable hidden source maps and remove them afte…https://github.com/getsentry/sentry-javascript/commit/c536e1e406ed852b6a501e0496f2567bae1a0ed4
c536e1ehttps://github.com/getsentry/sentry-javascript/commit/c536e1e406ed852b6a501e0496f2567bae1a0ed4
feat(bundler-plugins): Enable hidden source maps and remove them afte…https://github.com/getsentry/sentry-javascript/commit/03492d26b5d946b4fa2785151c93c6fb30a0a519
03492d2https://github.com/getsentry/sentry-javascript/commit/03492d26b5d946b4fa2785151c93c6fb30a0a519
feat(bundler-plugins): Enable hidden source maps and remove them afte…https://github.com/getsentry/sentry-javascript/commit/cfcb5c9447d36658b4b208ebba87bd066b49f4df
cfcb5c9https://github.com/getsentry/sentry-javascript/commit/cfcb5c9447d36658b4b208ebba87bd066b49f4df
feat(bundler-plugins): Enable external source maps and delete them af…https://github.com/getsentry/sentry-javascript/commit/e02e7457b9b6b75fe0ef2ce2d06f312454c0af07
e02e745https://github.com/getsentry/sentry-javascript/commit/e02e7457b9b6b75fe0ef2ce2d06f312454c0af07
Sign up for freehttps://github.com/signup?return_to=https://github.com/getsentry/sentry-javascript/issues/25609
Sign in to commenthttps://github.com/login?return_to=https://github.com/getsentry/sentry-javascript/issues/25609
Featurehttps://github.com/getsentry/sentry-javascript/issues?q=state%3Aopen%20label%3A%22Feature%22
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Response headers:
Servergithub.com
Content-Typetext/html; charset=utf-8
Cache-Controlmax-age=0, private, must-revalidate

Viewport: width=device-width


URLs of crawlers that visited me.