-
-
Notifications
You must be signed in to change notification settings - Fork 27k
Enable project references by upgrading TypeScript to >3.6 #7807
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
Comments
With regards to I'm all for supporting this, but it needs to be supported by our existing tool chain (webpack, babel, jest, fork-ts-checker-webpack-plugin, etc) via updated configuration or otherwise. |
project references + isolatedModules will be possible from typescript 3.7 Lets put aside fork-ts-checker-webpack-plugin [that has an open issue for it] (TypeStrong/fork-ts-checker-webpack-plugin#328) Other problems and possible workarounds: CRA use babel and not tsc to build typescript. But we don't need it to! So we need to make create-react-app/packages/react-scripts/config/webpack.config.js Lines 460 to 475 in 09cbb89
access also TypeScript package.json.main issue: But if the packages are suppose to be also published, A problem can be when there's a package with
3 possible workarounds:
|
I've created an example how it can be done: |
Duplicate of #6799 |
Closing in favor of existing issue. |
TypeScript project references have been available since
3.0
. The newest TypeScript (since3.6
) brought APIs exposing this feature. For those unfamiliar with the concept please see this great example project.Enabling this functionality would greatly improve the way we can share code amongst different apps. It should also increase the build speed as we would have access to incremental builds.
Our use cases would include:
Currently
tsc --build
isn't compatible because it conflicts with some opinions thatcreate-react-app
has (e.g.isolatedModules
). EDIT: as @ianschmitz pointed out below this opinion actually comes frombabel-plugin-transform-typescript
.Quote from Typescript 3.6 release announcement:
The text was updated successfully, but these errors were encountered: