| Rule ID | perf/unminified-js |
| Category | Performance |
| Scope | Per-page |
| Severity | warning |
| Weight | 5/10 |
Solution
Minify JavaScript to reduce file size and improve load times. Use build tools like Terser, esbuild, or UglifyJS. Most bundlers (Webpack, Vite, Rollup) minify automatically in production. Minification shortens variable names, removes whitespace, and dead code.Options
This rule supports the following configuration options:| Option | Type | Default | Description |
|---|---|---|---|
min_size_bytes | unknown | undefined | Minimum JS size in bytes to check for minification |
Configuration Example
squirrel.toml
Enable / Disable
Disable this rule
squirrel.toml
Disable all Performance rules
squirrel.toml
Enable only this rule
squirrel.toml