You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: allow to provide custom index.js template (#378)
New index.js generator does not cover my cases.
1. need to add `// @flow` on top of the file
2. need to use named export
Both can be easily solved with indexTemplate option.
```
function indexTemplate(files) {
const exportEntries = files.map(file => {
const basename = path.basename(file, path.extname(file))
return `export { ${basename} } from './${basename}'`
})
return '// @flow\n' + exportEntries.join('\n')
}
```
0 commit comments