These are base shared tsconfig.json
s from which all other tsconfig.json
's
inherit from.
The exposed
tsconfig.json
files are in the root of this package and not insidesrc
orstatic
because I want to use them in the host repository of this project too. And typescript doesn't care if I expose these usingexports
. No, theextends
field intsconfig
is just a path from the package, so they have to match in the source and the distributed package too.
Very important for interop with ES Modules. When importing a locally bundled dependency, using 'node' would try to import cjs modules from es modules, resulting in a runtime error.
TODO: Explore "moduleResolution": "bundler",
In vite projects this is not used, make sure that the vite config uses the target that you want
When both of these options are missing typescript will just import everything it can within its folder except what you're excluding. And that's exactly what we need.
For potential issues while developing this package. These are no concerns of the consumer.
error during build:
TSConfckParseError: failed to resolve "extends":"@alexaegis/ts/node" in js-tooling/packages/ts/tsconfig.json
This package consumes itself for building. Its tsconfig
is using definitions
defined within this plugin so if the package gets malformed like exports
gets
removed from this package.json, then it will fail to build. As long as the
tsconfigs exported here are valid, and they are exported it will be fine.