File tree 2 files changed +9
-14
lines changed
packages/docs/src/content/docs
2 files changed +9
-14
lines changed Original file line number Diff line number Diff line change @@ -56,11 +56,7 @@ Also see [configuring project files][1].
56
56
57
57
Knip shares files from separate workspaces if the configuration in
58
58
` tsconfig.json ` allows this. This reduces memory consumption and run duration.
59
- The relevant compiler options are ` baseUrl ` and ` paths ` , and a workspace is
60
- shared if the following is true:
61
-
62
- - The ` compilerOptions.baseUrl ` is not set explicitly
63
- - There are no conflicting keys in ` compilerOptions.paths `
59
+ Relevant compiler options include ` baseUrl ` , ` paths ` and ` moduleResolution ` .
64
60
65
61
With the ` --debug ` flag you can see how many programs Knip uses. Look for
66
62
messages like this:
@@ -81,6 +77,9 @@ The first number in `P1/1` is the number of the program, the second number
81
77
indicates additional entry files were found in the previous round so it does
82
78
another round of analysis on those files.
83
79
80
+ Use [ --isolate-workspaces] ( ../reference/cli.md#--isolate-workspaces ) to disable
81
+ this behavior.
82
+
84
83
## findReferences
85
84
86
85
The ` findReferences ` function (from the TypeScript Language Service) is invoked
Original file line number Diff line number Diff line change @@ -152,18 +152,14 @@ Also see [external libs][8].
152
152
153
153
### ` --isolate-workspaces `
154
154
155
- By default, Knip optimizes performance by adding eligible workspaces to existing
155
+ By default, Knip optimizes performance using
156
+ [ workspace sharing] ( ../guides/performance.md#workspace-sharing ) to existing
156
157
TypeScript programs, based on the compatibility of their ` compilerOptions ` . Use
157
158
this flag to disable this behavior and create one program per workspace.
158
159
159
- You can see the behavior in action in [ debug mode] [ 9 ] . Look for messages like
160
- this:
161
-
162
- ``` sh
163
- [* ] Installed 4 programs for 18 workspaces
164
- ...
165
- [* ] Analyzing used resolved files [P1/1] (78)
166
- ```
160
+ Usually this setting isn't necessary, but more of an escape hatch in rare cases
161
+ with memory usage issues or incompatible ` compilerOptions ` across workspaces.
162
+ Also useful during troubleshooting.
167
163
168
164
## Modes
169
165
You can’t perform that action at this time.
0 commit comments