Navigation Menu

Skip to content
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

Fix tsconfig.json detection #770

Merged
merged 2 commits into from Sep 13, 2021
Merged

Fix tsconfig.json detection #770

merged 2 commits into from Sep 13, 2021

Conversation

styfle
Copy link
Member

@styfle styfle commented Sep 13, 2021

This PR fixes a bug seen in PR vercel/vercel#6700 (see logs) where the tsconfig.json is in a parent directory.

The tsconfig-paths package was returning an error Missing baseUrl in compilerOptions.

So instead, we'll manually walk up the filesystem to find the relevant tsconfig.json like we do in @vercel/build-utils.


if (process === null || process === void 0 ? void 0 : process.env.FOO) {
console.log('foo');
}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@TooTallNate Here we can see the optional chaining operator is properly down-leveled 😌

@styfle styfle enabled auto-merge (squash) September 13, 2021 02:35
Copy link

@mrmckeb mrmckeb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It might be worth extracting walkParentDirs out, but not sure where...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants