← Reference

Source maps in production

Not a hole by itself. It removes all the effort from finding one.

01

What is exposed

A source map with sourcesContent reconstructs your original code from the minified bundle: comments, variable names, internal API routes, admin paths, feature flags, and any logic you assumed nobody would read.

Without sourcesContent it still reveals your folder and file structure, which tells someone how the app is organised.

02

Turning them off

Vite: build.sourcemap: false. Next.js: leave productionBrowserSourceMaps off. Create React App or craco: GENERATE_SOURCEMAP=false.

Then request any .map URL on your live site and confirm it 404s. Some hosts serve files from a previous build for a while.

03

If you want them for error tracking

Upload them to your error tracker at build time and exclude them from the deployed output. Sentry and similar tools all support this, and it gives you readable stack traces without publishing your code.

Not sure whether this applies to you?

Give us the address and we will tell you. No code, no access, no install — and every finding we have is shown in full, including on the free trial.

Check a site