This check detects JavaScript that appears to contain avoidable whitespace, comments, or long identifiers in a production response.
Why this matters
Minification lowers transfer size and can reduce download and parse time. Its effect depends on the bundle and compression, so it should complement—not replace—removing unused code and splitting large bundles.
How to fix it
- Enable the production mode of the existing bundler or framework rather than manually editing generated files.
- Apply Brotli or gzip compression at the server or CDN in addition to minification.
- Keep source maps private or intentionally published according to the project’s debugging policy.
- Exclude already minified third-party files from redundant processing when the build tool handles them correctly.
When the finding appears across many URLs, fix the shared component or layout that produces it instead of patching generated HTML page by page. Recheck representative templates and responsive states after deployment so the correction does not create a regression elsewhere.
How to verify the fix
Inspect the production response, Content-Encoding header, and transferred size. Confirm source functionality is unchanged and compare bundle sizes before and after the production build.
Keep before-and-after evidence for the affected URL, original output, correction, and verification method. If markup changes after load, test consent states, localization, responsive variants, and client-side navigation because the initial HTML and rendered DOM can differ.