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
We have a monorepo with multiple TypeScript packages. It breaks in the following scenario:
Package A with module A/foo.ts: import "B/bar"
Package B with module B/bar.ts: import "mappedPath/baz"
Run ts-node A/foo.ts.
When B/bar.ts is compiled, the TransformationContext has CompilerOptions from A, but NOT from B. So all the mappings from B/tsconfig.json are ignored.
Here's a workaround version that "solves" the issues for me. I am basically loading the nearest tsConfig.json and then using your ImportPathsResolver and some other coped stuff to make it work.
We have a monorepo with multiple TypeScript packages. It breaks in the following scenario:
Package
A
with moduleA/foo.ts
:import "B/bar"
Package
B
with moduleB/bar.ts
:import "mappedPath/baz"
Run
ts-node A/foo.ts
.When
B/bar.ts
is compiled, theTransformationContext
hasCompilerOptions
fromA
, but NOT fromB
. So all the mappings fromB/tsconfig.json
are ignored.Here's a workaround version that "solves" the issues for me. I am basically loading the nearest
tsConfig.json
and then using yourImportPathsResolver
and some other coped stuff to make it work.The text was updated successfully, but these errors were encountered: