Skip to main content
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
[rules]
disable = ["perf/source-maps"]

Disable all Performance rules

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

Enable only this rule

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