GitHub

Source Maps

Checks for source map availability and configuration

Checks for source map availability and configuration

Rule IDperf/source-maps
CategoryPerformance
ScopePer-page
Severityinfo
Weight3/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

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

Disable all Performance rules

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

Enable only this rule

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

Type to search…

↑↓ navigate ↵ open esc close