Skip to content

Commit 5cfb5a6

Browse files
authored
Stop documenting the extinct prepend option for project references (microsoft#3239)
1 parent 228e15e commit 5cfb5a6

File tree

1 file changed

+0
-29
lines changed

1 file changed

+0
-29
lines changed

packages/documentation/copy/en/project-config/Project References.md

-29
Original file line numberDiff line numberDiff line change
@@ -92,34 +92,6 @@ Enabling the [`composite`](/tsconfig#composite) flag changes a few things:
9292
We've also added support for [declaration source maps](https://github.com/Microsoft/TypeScript/issues/14479).
9393
If you enable [`declarationMap`](/tsconfig#declarationMap), you'll be able to use editor features like "Go to Definition" and Rename to transparently navigate and edit code across project boundaries in supported editors.
9494

95-
## `prepend` with `outFile`
96-
97-
You can also enable prepending the output of a dependency using the `prepend` option in a reference:
98-
99-
```js
100-
"references": [
101-
{ "path": "../utils", "prepend": true }
102-
]
103-
```
104-
105-
Prepending a project will include the project's output above the output of the current project.
106-
All output files (`.js`, `.d.ts`, `.js.map`, `.d.ts.map`) will be emitted correctly.
107-
108-
`tsc` will only ever use existing files on disk to do this process, so it's possible to create a project where a correct output file can't be generated because some project's output would be present more than once in the resulting file.
109-
For example:
110-
111-
```txt
112-
A
113-
^ ^
114-
/ \
115-
B C
116-
^ ^
117-
\ /
118-
D
119-
```
120-
121-
It's important in this situation to not prepend at each reference, because you'll end up with two copies of `A` in the output of `D` - this can lead to unexpected results.
122-
12395
## Caveats for Project References
12496

12597
Project references have a few trade-offs you should be aware of.
@@ -211,7 +183,6 @@ You will need to either set the [`outDir`](/tsconfig#outDir) to an explicit subf
211183
### Structuring for outFiles
212184

213185
Layout for compilations using [`outFile`](/tsconfig#outFile) is more flexible because relative paths don't matter as much.
214-
One thing to keep in mind is that you'll generally want to not use `prepend` until the "last" project - this will improve build times and reduce the amount of I/O needed in any given build.
215186
The TypeScript repo itself is a good reference here - we have some "library" projects and some "endpoint" projects; "endpoint" projects are kept as small as possible and pull in only the libraries they need.
216187

217188
<!--

0 commit comments

Comments
 (0)