-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Support for custom TSConfig path #226
Comments
I see why this would be useful, but I'm having trouble figuring out what the right implementation would be. There can be many tsconfig.json files spread throughout a directory tree. Does this force-override all of them? Just one of them? Is it only a fallback if no tsconfig.json file is found? Does there need to be some way of configuring different overrides for different directories? |
I’d follow the TS implementation:
— Source Which means:
|
Thanks for finding this information! After reading that, I agree that following the TypeScript implementation does sound like the right thing to do. |
I have a related issue, where I want to bundle the tsconfig compilerOptions.paths as "nodeModules", but it only looks at the package.json https://github.com/aws/aws-cdk/blob/b2037d3b1a63715f71587681c84a5fd34be939a7/packages/%40aws-cdk/aws-lambda-nodejs/lib/util.ts#L91 |
I'm not clear on whether this issue was closed because it was implemented, or denied? Is there currently a way to esbuild to set a custom tsconfig path? I could not find anything in the command line options list. I'm in this situation becuase I'm combining esbuild and another bundler on the same repo. Currently i have tsconfig's EDIT: nevermind, sorry I didn't realize at first that it was linking a revision above which fixed this. For future reference of anyone ending up here first: The option is:
and it's here in the docs https://esbuild.github.io/api/#tsconfig |
Hey,
Is there a chance ESBuild would support specifying a custom path to
tsconfig.json
/jsconfig.json
?Prior art
TypeScript supports passing a custom path to
tsconfig.json
using the-p
(or--project
) CLI parameter:Use cases
My use-case: the project I’m working on uses ESBuild for development and webpack for production. To run ESBuild, we have to replace one package with a custom mock. We do this through
tsconfig.json
’spaths
:However, putting this into the primary
tsconfig.json
results in a bad DX. (E.g., Ctrl+clickinglinaria
imports now leads to the mock instead of the original file.) It would be great if we hadtsconfig.esbuild.json
with necessary overrides – and were able to point ESBuild to use it.Other use-cases: A few projects I saw used
tsconfig.test.json
for custom test configs (e.g., for custominclude
/exclude
configuration).The text was updated successfully, but these errors were encountered: