ffdeptree icon indicating copy to clipboard operation
ffdeptree copied to clipboard

Issue: Does not resolve imports via index.ts exports

Open Anxhul10 opened this issue 5 months ago • 0 comments

Description

ffdeptree fails to resolve imports when they rely on re-exports via an index.ts file — particularly when using export { ... as default } or other re-export styles. It works fine when importing directly from the file, but not when the symbol is re-exported and then imported indirectly.

steps to reproduce

File structure:

root/
├── folderA/
│   └── index.ts
├── folderB/
│   ├── add.ts
│   └── index.ts

Contents:

folderB/add.ts
const  add = (a: number, b: number) => {
  return a + b;
}
export default add
folderB/index.ts
export { add as default } from './add';
folderA/index.ts
import { add } from '../folderB'; // ❌ This fails
// import { add  } from '../folderB/add.ts'; // ✅ This  works

Anxhul10 avatar Jun 30 '25 17:06 Anxhul10