Reputation: 61636
I've inherited a project where the pages have close to hundreds of includes. Every little piece of functionality was broken out by file.
Is there a way to find out which script includes are not used? I know there is a way to find dead methods via grep, but it's a slow and error prone.
Ideally, I'd like to feed the URL to a resource that would identify dead includes. Is something like this possible?
Upvotes: 0
Views: 48
Reputation: 1157
The rollup bundler has a treeshake
feature which will omit any unused function from it's output bundles. See the treeshake documentation
You might be able to fork and mod the source code to output the omitted functions if you so desire.
Upvotes: 2