SDK guides

Source maps

Upload your production build's sourcemaps and the Issues Fixback captures arrive with a symbolicated code-area pointer — the original file:line where the error likely lives, not a minified frame. There are two doors: a Vite plugin that does it during your build, and a CLI for everything else.

On Vite: the plugin

If you build with Vite, add the plugin and your pipeline gains no step at all — the upload happens inside vite build:

shell
npm install -D @fixback/vite-plugin
vite.config.ts
import { defineConfig } from "vite";import { fixbackSourcemaps } from "@fixback/vite-plugin";export default defineConfig({  plugins: [fixbackSourcemaps()],});

With FIXBACK_SECRET_KEY in the build environment, that's it. The plugin turns on hidden sourcemaps if you haven't, uploads them keyed by release, and prunes them from the output so they're never served. A missing key or a failed upload is a warning — your build still succeeds. Every option is in the @fixback/vite-plugin reference.

Everywhere else: the CLI

Not on Vite, or you'd rather keep the upload as its own CI step? @fixback/cli does the same upload standalone:

shell
# after your production build, locally or in CIFIXBACK_SECRET_KEY=sk_… npx @fixback/cli sourcemaps upload ./dist

That's the whole integration. If a release has no uploaded sourcemaps, nothing changes — the feature is simply off for it.

How it fits together

  1. Build with sourcemaps. e.g. Vite: build: { sourcemap: "hidden" } keeps the maps off the served site while still writing them to disk, which is what both the plugin and the CLI read. (The plugin turns this on for you.)
  2. Upload them per release. The CLI scans the build directory for *.js.map files and uploads each, keyed by a release--release, else FIXBACK_RELEASE, else your CI provider's commit SHA (GitHub Actions, Vercel, Cloudflare Pages, Netlify), else the current git commit SHA.
  3. Tell the SDK the same release so captured errors carry it, and Fixback symbolicates their stack traces against the matching maps:
    ts
    Fixback.init({ key: "pk_…", release: "<the same release>" });

    This join has to be exact — a release the SDK does not stamp matches nothing, and it fails silently. Pass the value through your build rather than typing it, since the default is a commit SHA. On Vite you can skip this step: the plugin injects the release it uploaded under, so there is nothing to keep in sync.

Auth

Uploads authenticate with your Project's secret key (Project settings → API keys), via FIXBACK_SECRET_KEY or --key. It's the server-side credential your CI already holds — never ship it in the page.

Notes

  • Re-running an upload for the same release is safe — artifacts upsert.
  • Retention is bounded: Fixback keeps your newest releases and prunes the oldest beyond the per-project cap.
  • Only JS maps (.js.map / .mjs.map / .cjs.map) upload — CSS maps can't symbolicate a stack trace.