Rollup plugin to list lost (unused) files in the project directory.
Lost files are listed in the stderr.
npm i -D rollup-plugin-lost
// src/index.js
import usedMod from './used'
console.log(usedMod)
// src/used.js
export default 'used-module'
// src/lost.js
export default 'lost-module'
// rollup.config.js
import lost from 'rollup-plugin-lost'
export default {
input: 'src/index.js',
output: {
dir: 'dist',
format: 'es',
},
plugins: [
lost(),
],
}
Lost files:
test/lost.js
string | RegExp | (string | RegExp)[] | null | undefined
'src/**/*'
Patterns to search for lost files.
string | RegExp | (string | RegExp)[] | null | undefined
Optional patterns to exclude from search for lost files.