feat(remix): Add source map upload for Remix 3 (#24943)
Remix 3 has no build step and no output directory, so there is nothing on disk for a source map upload to read. `emitAssets()` rebuilds the output by driving the app's own asset server: `getPreloads()` forces the browser module graph, and each compiled module and its map is written out. The debug IDs are hashed from the compiled source, so the emitted IDs match what the running server serves. The instrumented server hides source maps by default, so the emitter reads them through the server's own fetch, which the stamping wrapper now keeps reachable. `sentry-remix-v3-upload-sourcemaps` is a separate bin from the Remix 2 `sentry-upload-sourcemaps`. It must run under `--import @sentry/remix/v3/node`, which provides the TypeScript loader and patches the asset server. Without it the emitted modules carry no debug IDs, so the command fails on that rather than uploading an unusable set. This is far from optimal but until we found a better solution this works. The e2e test runs the bin against the app and checks that every module has a map, each pair shares a debug ID, and the emitted entry's ID equals the served one. It uses `--dry-run`: the CLI needs authentication even for `inject`, so the upload itself is verified separately in #24685. Fixes #24678 --------- Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
C
Charly Gomez committed
4b8c140c80bec0e8a36f6a1a6c19665497616362
Parent: ea5690e
Committed by GitHub <noreply@github.com>
on 10/2/2026, 11:36:47 AM