tsBuildInfoFile is not extendable. Add an alternative tsBuildInfoDir option
#61794
Open
6 tasks done
Uh oh!
There was an error while loading. Please reload this page.
π Search Terms
tsBuildInfoFile tsbuildinfo output directory
β Viability Checklist
β Suggestion
Add a
tsBuildInfoDirconfig option for specifying the output directory for the.tsbuildinfofile.π Motivating Example
With a project structure like this, there is no way to have the individual project configs (
tsconfig.client.tsetc.) derive theirtsBuildInfoFilesetting from the base config (tsconfig.base.json). If we settsBuildInfoFileto some custom value in the base config, the individual project configs all end up having the same output path for their.tsbuildinfofiles, which is of course wrong, so we have no better option than to settsBuildInfoFilefor each of the projects individually.The recently introduced
${configDir}template variable can't help us here since the config files are all located in the same folder. Even if they weren't, it still wouldn't give us enough flexibility.One possible solution is to rely on the
outDiroption which also affects where.tsbuildinfofiles are placed, but it's only fine if we don't mind them being placed beside other output files, or if there are no other output files because we are usingnoEmit.What I suggest is adding a
tsBuildInfoDiroption for specifying the output directory for the.tsbuildinfofile as an alternative totsBuildInfoFile. The process of determining how the file is placed within that directory should be identical to that ofoutDir/declarationDir, meaning that the config file's placement relative torootDirshould be replicated.With the following
tsconfig.base.json,this would enable structure as complicated as this one:
Here is what I assumed about the other config files:
Click to expand
When both
tsBuildInfoDirandtsBuildInfoFileare set, the latter could be interpreted as the desired file name rather than the path (the path is then${tsBuildInfoDir}/${tsBuildInfoFile}).π» Use Cases
β Putting
.tsbuildinfofiles undernode_modules/.tsbuildinfoso that they are not in the way, but I still get the advantages of incremental builds.β The shortcomings of
tsBuildInfoFileandoutDirare described above.β Setting
tsBuildInfoFilefor each project individually :(The text was updated successfully, but these errors were encountered: