Recursive barrels with defaults incorrect create defaults
bruceharrison1984 opened this issue · 1 comments
bruceharrison1984 commented
Trying to use this with a nested structure results in invalid barrels:
export { default as index } from "./components/index";
export * from "./components/index";
export { default as index } from "./hooks/index";
export * from "./hooks/index";
within this intermediate barrel, each index
file is named the same thing.
In this case, I would expect *
imports, not default imports.
src/
├─ components/
│ ├─ toolbar/
│ │ ├─ index.ts <-- this is generated correctly
│ ├─ button/
│ │ ├─ index.ts
│ ├─ index.ts <--- this file contains defaults as index
config I used
{
"directory": "./src",
"delete": true,
"location": "all",
"name": "index",
"structure": "flat",
"exportDefault": true,
"verbose": true,
"include": [
"(components|hooks)\/.*.tsx$",
"(components|hooks)\/.*.ts$"
],
"exclude": [
".stories.tsx$",
".props.ts$"
]
}
bruceharrison1984 commented
I'm just an idiot, further configuration of exclusions solved my issue.