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

Typescript integration on monorepos #103

Open
robert-melonn opened this issue Oct 30, 2024 · 0 comments
Open

Typescript integration on monorepos #103

robert-melonn opened this issue Oct 30, 2024 · 0 comments

Comments

@robert-melonn
Copy link

Hello @anthonyshew , first of all thank you for this great resource on monorepo, it is very useful. However, I am facing some doubts about integrating typescript into monorepo. According to your example, you decided to propose an integration of internal packages where each package does an incremental compilation, this is moderately good (because you still have to be building declarations on the fly), but it works well. But there are certain points:

  1. In modern development there will be (and MUST be) tsconfig files for environments (intentions) such as: source code (tsconfig.json or tsconfig.src.json) , tooling written in ts (tsconfig.node.json), unit testing (tsconfig.test. json), e2e code (tsconfig.e2e.json) or even storybook code (tsconfig.storybook.json). If we implemented the way turbo recommends, we would only be checking types for the source code environment, but we would have no way to trigger type checking for the rest of the environment, and I feel like it would be a bit complex. Do you think there could be an approach to handle these cases?

  2. In my head I can handle this by myself using typescript project references , although I think due to some incompatibility with the pnpm installation mode with the way d.ts files are output I won't be able to use it, see here . Even if I could, what way would you recommend to be able to use project references together with turborepo?

PD: using just-in-time packages is not a option. I have two apps with 2 differents ts configurations, so importing the same code base with different configurations will bring conflicts. And the issue of environments would still not be resolved

Thank you, I hope you can read and respond to me. Great job with all this

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

No branches or pull requests

1 participant