37 likes
·
5.4K reads
3 comments
very nice content, thanks for sharing this information with a basic and understandable example.
Nice summary. A question about the placement of the rootDir and ourDir compiler options. Why not place that in the tsconfig.base.json? Then it only has to be done once? Is there something about placing it there that changes things?
That would break the compilation because the paths are always relative to the original configuration file. In this case, specifying these paths in the tsconfig.base.json, would mean that the paths are relative to the base file.
typescriptlang.org/tsconfig#extends Properties with relative paths found in the configuration file, which aren’t excluded from inheritance, will be resolved relative to the configuration file they originated in.