Hacktoberfest 2026:維護者為十月標記出來的 issue,仍然開放、適合新手。 瀏覽 Hacktoberfest issue

Add source map upload for Remix 3

未關閉
#24,678 1 則留言 0 個 reaction 已指派 1 人 在 GitHub 檢視

維護者通常 1 天內回覆

@chargome 已經在處理了。

開始於 2026年9月24日。

評估

這個 Issue 還沒有評估資料。

描述

Remix

Remix 3 has no build step and produces no output directory, so there is nothing on disk for a source map upload to read. Rebuild that artifact set by driving the app's own asset server.

  • Add a command that imports the app's asset server module, forces the browser module graph, and writes each compiled module and its source map to a directory.
  • Stamp each file with //# debugId= and each map with a debugId field, so sentry-cli can pair them.
  • Upload the directory.

This has to be its own bin, separate from the existing sentry-upload-sourcemaps. That one is the Remix 2 command, takes --buildPath and --urlPrefix, and assumes a build directory that Remix 3 never produces. It cannot be overloaded without breaking Remix 2 users. Name the new one consistently with the v3 subpaths, so it is obvious which Remix each belongs to.

Uploading goes through the Sentry CLI, via the sentry package that @sentry/remix already depends on for the Remix 2 command. It needs SENTRY_ORG, SENTRY_PROJECT and SENTRY_AUTH_TOKEN. Note the CLI requires authentication even for sourcemap inject, so no part of this can run unauthenticated in tests. That is why verifying against a real org is tracked separately.

getPreloads() is what forces compilation. The asset server compiles lazily, so without it only the few modules something happened to request get emitted, and the upload is quietly almost empty.

The command must run under our --import entry. Importing the app's asset server in a plain Node process builds an unpatched asset server, and the output carries no debug IDs at all. Warn loudly when no debug IDs are found, because that failure is otherwise silent.

Done when the emitted directory has one map per module, every pair shares a debug ID, and the emitted ID matches what the running server serves.

主要語言
TypeScript
星號
8.7k
分支
1.9k
平均合併
1 天 17 小時
30 天內合併 PR
543

環境準備

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

getsentry/sentry-javascript 的其他 Issue

查看 getsentry/sentry-javascript 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。