URL: /rules/perf/source-maps

---
title: "Source Maps"
description: "Checks for source map availability and configuration"
---

Checks for source map availability and configuration

| | |
|---|---|
| **Rule ID** | `perf/source-maps` |
| **Category** | [Performance](/rules/perf) |
| **Scope** | Per-page |
| **Severity** | info |
| **Weight** | 3/10 |

## Solution

Source maps help debug minified code but can expose source code if publicly accessible. For production: 1) Either remove source maps entirely, 2) Restrict access via server config, or 3) Use 'hidden' source maps uploaded only to error tracking services. Exposed source maps can reveal business logic and security implementations to attackers.

## Enable / Disable

### Disable this rule

```toml squirrel.toml
[rules]
disable = ["perf/source-maps"]
```

### Disable all Performance rules

```toml squirrel.toml
[rules]
disable = ["perf/*"]
```

### Enable only this rule

```toml squirrel.toml
[rules]
enable = ["perf/source-maps"]
disable = ["*"]
```
