ts2esm icon indicating copy to clipboard operation
ts2esm copied to clipboard

Support for tsconfig paths in monorepos

Open bennycode opened this issue 8 months ago • 0 comments

Project:

  • /tsconfig.json - root tsconfig, has path mappings such as @mylib -> /libs/mylib/src/index.ts
  • /libs/*
  • /libs/mylib/tsconfig.json lib tsconfig extends root one and has an include field for src/*
  • /libs/mylib/src/*
  • /apps/myapp/tsconfig.json app tsconfig extends root one and has an include field for src/*
  • /apps/myapp/src/*

Currently sourceFile.getProject() from ts-morph](https://github.com/dsherret/ts-morph) to locate TS configs. The sourceFile should be a .d.ts file to properly find references from co-located packages: https://github.com/dsherret/ts-morph/issues/1242#issuecomment-1028345568

bennycode avatar Feb 08 '25 15:02 bennycode