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 tshy.project being a package #95

Closed
wants to merge 1 commit into from

Conversation

SBoudrias
Copy link

@SBoudrias SBoudrias commented Sep 27, 2024

In a monorepo, I think it is fairly common for the base tsconfig.json file to be contained within an internal package.

It is for example how turborepo recommend creating TS monorepos.

import.meta.resolve is a Release candidate. Let me know if you'd prefer like:

const require = createRequire(import.meta.url);
const pathName = require.resolve(p);

@isaacs
Copy link
Owner

isaacs commented Oct 7, 2024

This won't work if you do "tshy": { "project": "blah.tsconfig.json" } in your package.json file, which is the intent, because you can't import.meta.resolve() a JSON file.

@SBoudrias
Copy link
Author

Ah, too bad. Reflecting on this, I don't think it's a necessary feature anyway. The ts-server doesn't work well without tsconfig.json files at the root, so I ended up keeping the boilerplate I was hoping to remove 😅 (it was tsconfig.json boilerplate vs extra configs elsewhere)

Thanks for the answer, I'll close.

@SBoudrias SBoudrias closed this Oct 10, 2024
@SBoudrias SBoudrias deleted the fix/package-project-tshy branch October 10, 2024 21:18
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.

2 participants