-
Notifications
You must be signed in to change notification settings - Fork 509
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
tsdx ignores tsconfig.json "extends" keyword #484
Comments
great qtn. we'll probably want to handle this. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
👍 this would be great for typescript monorepos. Some of the tinacms packages use |
Echoing @ncphillips, I originally ended up here at tsdx because my project depends on the https://github.com/reach/reach-ui monorepo that uses tsdx and uses Luckily the only rollup settings pulled direct from JSON by tsdx are |
anyone want to tackle this? |
Oh, I already did hah. @justingrant said he didn't have time for this in #483 (comment) so I made the solution myself (see above reference). Still need to add a test for the extends case, hence the draft, but will do that in a day or few as I have to focus on some other things |
ok. @agilgur5 we're piling up quite a few PR's for jared to review, lets slow down so that we dont swamp him with too much stuff. |
Hrmmm. I thought this worked? Maybe a false positive. Let’s fix |
@jaredpalmer see #484 (comment) . #483 also has a more detailed description. This is specifically for TSDX-specific options like |
i mean i just want to keep it manageable for jared. its not my name on the repo heheh |
On the mention of contributing less, I'm just going to leave this reference to theory of constraints here 😄 |
This comment has been minimized.
This comment has been minimized.
@jessekrubin are you sure you were facing this issue? As written above a few times, currently this only affects the |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Repeating here from #483 :
|
Current Behavior
There's an extends feature in tsconfig which allows configuration inheritance across multiple tsconfig files. This however isn't recognized in tsdx, which parses tsconfig here:
tsdx/src/createRollupConfig.ts
Lines 46 to 49 in 4f6de10
The JSON object is used as-is, instead of drilling up to resolve parent config.
Expected behavior
tsdx should process
extends
just like tsc does.Suggested solution(s)
In a quick look through TypeScript's source code I couldn't find the place where
extends
is handled, but it's possible that TypeScript's exported tsconfig parsing functions might handle extends for us automatically. See https://github.com/microsoft/TypeScript/blob/760393f893358a462b00eef7e8fb92342b0f71ad/lib/typescript.d.ts#L3639-L3647 what what TS offers in its API. The implementation is here: https://github.com/Microsoft/TypeScript/blob/6487d1ffe0d903b1e55a187ddeb973fe0d445a2f/src/compiler/parser.ts#L717Additional context
This problem is similar to #483 in that both this issue and that one are caused by parsing tsconfig differently than tsc does.
Your environment
The text was updated successfully, but these errors were encountered: