This repo contains the source code for the https://sourcemap.tools.
This little web app allows you to paste a stack trace of minified JavaScript code, apply source maps to it, and see the original positions of the errors.
The application may help investigate errors in production if you do not host source maps but can still extract them from build artifacts.
Inspired by https://sourcemaps.info/, but does everything on the client and does not try to fetch sources or source maps.
- Paste your stack trace on the left.
- Provide source maps by choosing files or pasting the content of the source map.
- See the results on the right.
Indexed (sectioned) source maps are not supported. Some tools (e.g. webpack with source-map-loader) produce source maps with a sections field instead of mappings. These will be rejected silently.
If you have a real-world case where this matters, please open an issue and attach the source map file and a sample stack trace — that will make it straightforward to add test coverage and implement support.
-
Clone the repository
-
Go to the project's directory and install dependencies
npm ci
-
Run and go to http://localhost:5173/
npm run dev
-
Optionally run tests
npm test
The app itself sends nothing anywhere: it emits neutral app events (src/app-events.ts) that
nobody listens to by default. Stack traces and source maps never leave the browser.
The deployment of https://sourcemap.tools builds with VITE_ANALYTICS=simple-analytics, which
loads the Simple Analytics snippet and the adapter in
src/analytics/simple-analytics.ts. It forwards event names only — no user content.
Builds without that variable, including every fork, ship no analytics: no snippet, no adapter.
