feat: upload browser source maps to GlitchTip at build time #33
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/glitchtip-sourcemaps"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What
Browser errors in GlitchTip currently show minified stack frames. This uploads client source maps on every
pnpm buildso frames resolve to the original source.hiddensource maps (nosourceMappingURLcomment).glitchtipSourcemaps()(scripts/glitchtip-sourcemaps.ts) runs after the client bundle is written:GLITCHTIP_AUTH_TOKEN,GLITCHTIP_ORGandGLITCHTIP_PROJECTare set, runs@sentry/cli sourcemaps injectandupload. Debug IDs tie each chunk to its map, so no release has to match.GLITCHTIP_URLdefaults to the origin ofGLITCHTIP_DSN..mapfiles, so the source is never served.@sentry/cli(2.x) is a devDependency. Its postinstall is disabled inallowBuilds, because the binary ships as a per-platform optional dependency.Deploy
Set
GLITCHTIP_AUTH_TOKEN(project:releasesscope),GLITCHTIP_ORGandGLITCHTIP_PROJECTas build-time env vars in Dokploy. Without them the upload is skipped, and the maps are still removed.Checks
pnpm typecheck,pnpm lintandpnpm buildpass locally. The upload was skipped locally (no credentials), the plugin removed 38.mapfiles, and.output/contains none. The actual upload to GlitchTip is untested until a deploy has the env vars set.🤖 Generated with Claude Code