Title: esbuild plugin stops injecting debug IDs after the first rebuild of a context · Issue #26098 · getsentry/sentry-javascript · GitHub
Open Graph Title: esbuild plugin stops injecting debug IDs after the first rebuild of a context · Issue #26098 · getsentry/sentry-javascript
X Title: esbuild plugin stops injecting debug IDs after the first rebuild of a context · Issue #26098 · getsentry/sentry-javascript
Description: Which SDK are you using? @sentry/bundler-plugins (esbuild plugin) SDK Version 11.10.0 Framework Version esbuild 0.28 Link to Sentry event No response Reproduction Example/SDK Setup Create an esbuild.context() with the Sentry esbuild plug...
Open Graph Description: Which SDK are you using? @sentry/bundler-plugins (esbuild plugin) SDK Version 11.10.0 Framework Version esbuild 0.28 Link to Sentry event No response Reproduction Example/SDK Setup Create an esbuil...
X Description: Which SDK are you using? @sentry/bundler-plugins (esbuild plugin) SDK Version 11.10.0 Framework Version esbuild 0.28 Link to Sentry event No response Reproduction Example/SDK Setup Create an esbuil...
Opengraph URL: https://github.com/getsentry/sentry-javascript/issues/26098
X: @github
Domain: github.com
IPv4 address: 140.82.114.4
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"esbuild plugin stops injecting debug IDs after the first rebuild of a context","articleBody":"### Which SDK are you using?\n\n@sentry/bundler-plugins (esbuild plugin)\n\n### SDK Version\n\n11.10.0\n\n### Framework Version\n\nesbuild 0.28\n\n### Link to Sentry event\n\n_No response_\n\n### Reproduction Example/SDK Setup\n\nCreate an `esbuild.context()` with the Sentry esbuild plugin and call `rebuild()` twice. The first build injects a debug ID into each entry point. The second build does not: the plugin clears its set of already wrapped entry points in `setup`, which esbuild runs once per context, so on a rebuild every entry point counts as already wrapped and the `onResolve` hook skips it.\n\nReported by @isaacs in https://github.com/getsentry/sentry-javascript/pull/25648#discussion_r4462512281.\n\n### Steps to Reproduce\n\n1. `const ctx = await esbuild.context({ entryPoints: ['entry.js'], bundle: true, sourcemap: true, outdir: 'dist', plugins: [sentryEsbuildPlugin({ ... })] })`\n2. `await ctx.rebuild()` and check `dist/entry.js` for a `sentry-dbid-` marker and `//# debugId=` comment\n3. `await ctx.rebuild()` again and check the same file\n\n### Expected Result\n\nEvery rebuild, including watch mode, injects a debug ID into each entry point and uploads its source map.\n\n### Actual Result\n\nFrom the second build on, the bundles carry no debug ID. The upload warns `No source maps found for any of the N matched build artifacts` and nothing is uploaded, although source maps were written.","author":{"url":"https://github.com/timfish","@type":"Person","name":"timfish"},"datePublished":"2026-11-04T12:36:41Z","url":"https://github.com/getsentry/sentry-javascript/issues/26098"}
| react-profiling | 0 |
| react-import-map | react,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-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:7a50aa10-6616-35a9-f5e7-2b6f8be301ba |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C88C:25A901:27723B:3523C9:6B043345 |
| html-safe-nonce | 18e2debf409ce804b4198374cd2ed17f21ade68b5ea1ccfe8c29cbb7c8e856ca |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDODhDOjI1QTkwMToyNzcyM0I6MzUyM0M5OjZCMDQzMzQ1IiwidmlzaXRvcl9pZCI6Ijc3MjA3NjA2MTQ2OTk5Mzg2MjkiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 3e306bfda223572edd80b234430a4247f600e97253eed26fdfa7fde931210eee |
| hovercard-subject-tag | issue:6202819608 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/getsentry/sentry-javascript/26098/issue_layout |
| twitter:image | https://opengraph.githubassets.com/b4cffd0d346e063e17db33b252fb67917eeafd76ebea01bf391b377845040097/getsentry/sentry-javascript/issues/26098 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/b4cffd0d346e063e17db33b252fb67917eeafd76ebea01bf391b377845040097/getsentry/sentry-javascript/issues/26098 |
| og:image:alt | Which SDK are you using? @sentry/bundler-plugins (esbuild plugin) SDK Version 11.10.0 Framework Version esbuild 0.28 Link to Sentry event No response Reproduction Example/SDK Setup Create an esbuil... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | timfish |
| hostname | github.com |
| expected-hostname | github.com |
| None | b7a1d2b9101496921b08579fbee988d014345aef2f5bd660d1f8c7332d81560e |
| turbo-cache-control | no-preview |
| go-import | github.com/getsentry/sentry-javascript git https://github.com/getsentry/sentry-javascript.git |
| octolytics-dimension-user_id | 1396951 |
| octolytics-dimension-user_login | getsentry |
| octolytics-dimension-repository_id | 3328572 |
| octolytics-dimension-repository_nwo | getsentry/sentry-javascript |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 3328572 |
| octolytics-dimension-repository_network_root_nwo | getsentry/sentry-javascript |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | c3dd496c3da6ea6b77e69c09279d2b81604654f1 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width