I use Turborepo for my monorepo. It defaults to having a single yarn workspace module for shared TSConfigs.
So a sub-package that uses swc-node has a tsconfig.json that extends another tsconfig.json file, except that file lives in a separate sub-package, and is resolved via the node module system. This works for tsc, but it doesn't work for swc-node; if i run SWC_NODE_PROJECT=./tsconfig.json node -r @swc-node/register path/to/script then I get the error Convert compiler options from json failed, File 'tsconfig/base' not found. where tsconfig is the name of the submodule containing the root TSConfig.
I'll link to a repro repo soon, but I think this more or less captures the issue.
I use Turborepo for my monorepo. It defaults to having a single yarn workspace module for shared TSConfigs.
So a sub-package that uses
swc-node
has atsconfig.json
thatextends
anothertsconfig.json
file, except that file lives in a separate sub-package, and is resolved via the node module system. This works fortsc
, but it doesn't work forswc-node
; if i runSWC_NODE_PROJECT=./tsconfig.json node -r @swc-node/register path/to/script
then I get the errorConvert compiler options from json failed, File 'tsconfig/base' not found.
wheretsconfig
is the name of the submodule containing the root TSConfig.I'll link to a repro repo soon, but I think this more or less captures the issue.