Skip to content

Commit 6d2dcb4

Browse files
authored
feat: stabilize optimizeDeps.noDiscovery (#19984)
1 parent 70aee13 commit 6d2dcb4

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

docs/config/dep-optimization-options.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,13 @@ Certain options are omitted since changing them would not be compatible with Vit
7878

7979
Set to `true` to force dependency pre-bundling, ignoring previously cached optimized dependencies.
8080

81+
## optimizeDeps.noDiscovery
82+
83+
- **Type:** `boolean`
84+
- **Default:** `false`
85+
86+
When set to `true`, automatic dependency discovery will be disabled and only dependencies listed in `optimizeDeps.include` will be optimized. CJS-only dependencies must be present in `optimizeDeps.include` during dev.
87+
8188
## optimizeDeps.holdUntilCrawlEnd
8289

8390
- **Experimental:** [Give Feedback](https://github.com/vitejs/vite/discussions/15834)

packages/vite/src/node/optimizer/index.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,6 @@ export interface DepOptimizationConfig {
131131
* listed in `include` will be optimized. The scanner isn't run for cold start
132132
* in this case. CJS-only dependencies must be present in `include` during dev.
133133
* @default false
134-
* @experimental
135134
*/
136135
noDiscovery?: boolean
137136
/**

0 commit comments

Comments
 (0)