2kb zero dependency library to create index.js files automatically
npm i -D index-maker
"indexer": "index-maker src/**/*.js"
3. Optionally specify index file name with flag -i
and extention of import files -x
(you might need it to work with typescript)
index-maker src/**/*.ts -i index.ts -x js
index-maker src/**/*.ts -f
index-maker src/**/*.ts -d
This is ESM module only