# Source map exposure
*Exposure*
Do not publish source maps that contain your original source code.

## Why it matters
A source map with sourcesContent gives anyone a readable copy of your front-end code, comments, and internal names.
It is not a direct break-in, but it shortens the work for someone looking for an endpoint or a hidden key.

## How to fix it
1. Stop publishing .map files in production
2. Or upload them privately for error tracking only
3. Remove the sourceMappingURL comment from production builds

## Prompt for an AI assistant
Copy the text below and paste it into an AI assistant.
```text
You are the person improving this website. Check the item below and fix it if it applies to the site.

Item: Source map exposure
Summary: Do not publish source maps that contain your original source code.
Steps:
1. Stop publishing .map files in production
2. Or upload them privately for error tracking only
3. Remove the sourceMappingURL comment from production builds
References:
- Source maps (MDN) (https://developer.mozilla.org/en-US/docs/Tools/Debugger/How_to/Use_a_source_map)

Constraints:
- Keep the existing design and tone of voice.
- Show the file or section you changed and the suggested final wording.
- Do not decide ambiguous points alone; give options and a recommendation.
- Do not change anything outside the listed item.
```

## Checked by
- **[vuln](https://ismyappok.com/en/vuln/checks)** — Public exposure checks

## Related checks
- **[.env file exposure](https://ismyappok.com/en/checks/env-file-exposure)** — Make sure .env and other secret files cannot be downloaded from the public site.
- **[Secrets in client JavaScript](https://ismyappok.com/en/checks/client-secrets)** — Keep API keys and tokens out of the JavaScript that browsers download.

## References
- **[Source maps (MDN)](https://developer.mozilla.org/en-US/docs/Tools/Debugger/How_to/Use_a_source_map)** — MDN (Mozilla) reference（Reference）

## Check your site now
Enter a URL and find what is missing before launch, for free.
[Run audit](https://ismyappok.com/en/audit/check)