find unused modules in webpack projects, include files and dependencies in package.json
1.get the stats.json files with webpack
$ webpack --json > stats.json
2.find the unused files
const findUnusedFiles = require('./src/index.js')
findUnusedFiles(options).then(files => {
// get the files and do whatever you want
console.log(files)
})
the pattern of the files you want to check
'./src/**'
auto remove the unused files
false