I am provided a legacy code, where in my JSP files I can see tens of JavaScript files import. I want to understand if all these files are being used (and preferably what all methods), to reduce unwanted load time.
I have done similar exercise with Java, using code coverage tool. On local server I would deploy the application along with coverage tool and go through common flows from UI. This would give a good idea of what all Java code is being used. Fortunately there are only 8-10 flows for the app which can be executed manually.
I was wondering if similar method can be used to understand JS usage. or is there some other way to figure out what all files are being in use?