Skip to content

Commit c77e332

Browse files
nabdelgadirbajtos
andcommitted
docs: add tsconfig info
Co-authored-by: Miroslav Bajtoš <[email protected]>
1 parent 464ce4b commit c77e332

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

docs/site/DEVELOPING.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -510,3 +510,25 @@ configuration, it's important to verify that all usage scenarios keep working.
510510
5. Test integration with supported IDEs:
511511

512512
- [VS Code](./VSCODE.md#how-to-verify-tslint-setup)
513+
514+
### tsconfig files
515+
516+
In the [`loopback-next`](https://github.com/strongloop/loopback-next) monorepo,
517+
`TypeScript` is set up in two places:
518+
519+
1. When using VS Code, the `TypeScript` engine views `loopback-next` as a single
520+
big project.
521+
522+
This enables the "refactor - rename" command to change all places using the
523+
renamed symbol, and also makes "go to definition" command jump to `.ts` files
524+
containing the original source code. Otherwise "refactor - rename" works
525+
within the same package only and "go to definition" jumps to `.d.ts` files.
526+
527+
2. When building the monorepo, we need to build the packages individually, so
528+
that one `dist` directory is created for each package.
529+
530+
This is why we have two sets of `tsconfig` files:
531+
532+
- At monorepo root, there is `tsconfig.json` used by VS Code.
533+
- Inside each package, there is `tsconfig.build.json` used by `npm run build`
534+
command.

0 commit comments

Comments
 (0)