Thank you very much. Or how to traverse the entire website to know which js files are used
Only some incomplete and reliable solutions can be provided.
Strace -e trace=open node your website.js
straceAll files you visit will be recorded.
Then find a way to traverse the entire website, such as
curl/wget(but not ajax. )
Otherwise, let your website run long enough and then
Find -atime plus 180 directoryFind files that have not been accessed for more than 180 days.