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
As part of resolving "extends" in tsconfig files, typescript looks for the "tsconfig" key in the package.json file. Esbuild instead looks for a few locations.
Our base tsconfig is called tsconfig.base.json as it's not meant to be picked up by typescript directly but via other tsconfigs that extend it. Our package.json includes "tsconfig": "./tsconfig.base.json", but esbuild doesn't pick that up.
Huh, today I learned. Where is that documented on https://www.typescriptlang.org/? I can't find any documentation about this. The only thing I found was this open issue which appears to be a request for a feature that doesn't exist.
For each of those packages, TypeScript will first check whether package.json contains a "tsconfig" field, and if it does, TypeScript will try to load a configuration file from that field. If neither exists, TypeScript will try to read from a tsconfig.json at the root.
Thanks for the link. So it sounds like this only happens when you reference a package name via extends. In that case esbuild should check that package's package.json file for a tsconfig field. The relevant issue and PR is microsoft/TypeScript#18865 and microsoft/TypeScript#27348.
As part of resolving "extends" in tsconfig files, typescript looks for the "tsconfig" key in the
package.json
file. Esbuild instead looks for a few locations.Our base tsconfig is called
tsconfig.base.json
as it's not meant to be picked up by typescript directly but via other tsconfigs that extend it. Our package.json includes"tsconfig": "./tsconfig.base.json"
, but esbuild doesn't pick that up.https://github.com/microsoft/TypeScript/blob/4879087bef68e24ec2f7c98d83d70a88a5cc18c4/src/compiler/moduleNameResolver.ts#L377-L379
esbuild/internal/resolver/resolver.go
Line 1177 in ddfdfb8
The text was updated successfully, but these errors were encountered: