-
Notifications
You must be signed in to change notification settings - Fork 12.8k
Add extendsExact: bool
property to tsconfig.json
#30163
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I think this will also fix #29172. |
I would love to see this implemented. @nodkz have you looked into creating a PR for this? We might be able to get this in more easily if we have code ready for them to import. |
It is useful to the monorepo project which its sub packages all have a same tsconfig.json configuration but need they own outDir and typeRoot |
I have a related use-case where I am also using lerna and every package is basically running some sort of filewatcher that executes a tsc compilation on its respective source code. I'm running all of them from my monorepo root with |
I'd really love this. We want to standardise configs across all our repos at Flarum, but this means duplicated entries at the moment. |
Search Terms
Lerna monorepo, extends, config inheritance, disable relative path.
Suggestion
According to design choise of
extends
property to make paths relative - it brings some problems for monorepos with multiple packages with different configs.I suggest to add
extendsExact: bool
property totsconfig.json
which will keep paths as is (without resolving relative paths)It quite simple to implement with current codebase and allows to developers use different scenarios.
Use Cases
We cannot use base template for all packages (we have 20 packages and need to fix in every config
includes
andexcludes
sections). It quite hard to track. If we add something to base template, we should to change all tsconfigs in every package.My real use case is quite complex. We have boilerplate repo, where defined all configs, dev packages and code conventions. I maintain this MAIN repo. All other developers fork my repo and adds their code to
packages
folder (in Lerna way) where use some of config from root folder for their packages. So at any time I may update my boilerplate (MAIN repo) and all other teams may easily merge my changes without affecting their code inpackages
folder.Examples
We have a base configs:
And in Lerna monorepo developers may use these tsconfig as real dumb template:
So with such monorepo I can just change root config file, and all packages gets new config with EXACT paths for (
files
,includes
,excludes
) like they are in root config files.Checklist
My suggestion meets these guidelines:
The text was updated successfully, but these errors were encountered: