The Chrome Dev Tools JavaScript and CSS Coverage Drawer is quite impressive, but there is one thing that could make it even better. It would be great if it could remain active without restarting its analysis every time you visit a new page.
I wish I could analyze an entire website, specific pages, or multiple websites to identify any unused code across them.
I understand that conducting a thorough examination of entire projects and using all features may take some time, but it's definitely more efficient than not having such a tool at all. The vast codebase in question (1.9mb uncompressed on the front end) may contain outdated code, unnecessary dependencies, or fragments only relevant in certain parts which can potentially help streamline the codebase.
Is there a way to delve into code usage without having to manually inspect each line of code?
I initially thought Google's coverage utility could analyze multiple pages simultaneously, but unfortunately it can't. Are there any other tools out there capable of scanning whole sites or multiple pages to detect redundant JS and CSS?
On a side note, the CSS is written in SASS, so manual analysis and optimization may still be required despite finding unused code automatically. Similar attention might be needed for minified JS files.
This inquiry doesn't seek software recommendations; rather, it aims to know if a particular task is achievable, thereby yielding a simple yes or no response.
UPDATE: While utilities for CSS exist, I have yet to find any specific tool for identifying unused JS code.