Open zemse opened 1 year ago
It seems this issue is caused in rollup-plugin-typescript2
. The user's tsconfig is overridden and moduleResolution is set to legacy node resolution (relevant code).
I've locally tried to patch this. However, the build gets stuck forever. There may be a reason why this is overridden.
I've created an upsteam issue https://github.com/ezolenko/rollup-plugin-typescript2/issues/437.
Current Behavior
If I want to use
moduleResolution
as node16, currently tsdx ignores what is specified in tsconfig and uses legacy module resolution. This causes typescript errors.The particular feature that I want to use is package.json exports. For this to work, the
moduleResolution
should be set tonode16
. By setting this, typescript errors in vscode disappear, howevertsdx build
does not succeed (and the error that it gives is similar to what vscode gives without node16 moduleResolution).Example error:
Here, ethers is a package, and address is defined as an export in it's package.json.
Expected behavior
It should build.
Suggested solution(s)
Additional context
Your environment