File tree Expand file tree Collapse file tree 3 files changed +14
-1
lines changed Expand file tree Collapse file tree 3 files changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -79,6 +79,8 @@ vite build [root]
79
79
80
80
Pre-bundle dependencies.
81
81
82
+ ** Deprecated** : the pre-bundle process runs automatically and does not need to be called.
83
+
82
84
#### Usage
83
85
84
86
``` bash
Original file line number Diff line number Diff line change 333
333
334
334
// optimize
335
335
cli
336
- . command ( 'optimize [root]' , 'pre-bundle dependencies' )
336
+ . command (
337
+ 'optimize [root]' ,
338
+ 'pre-bundle dependencies (deprecated, the pre-bundle process runs automatically and does not need to be called)' ,
339
+ )
337
340
. option (
338
341
'--force' ,
339
342
`[boolean] force the optimizer to ignore the cache and re-bundle` ,
Original file line number Diff line number Diff line change @@ -246,6 +246,8 @@ export interface DepOptimizationMetadata {
246
246
/**
247
247
* Scan and optimize dependencies within a project.
248
248
* Used by Vite CLI when running `vite optimize`.
249
+ *
250
+ * @deprecated the optimization process runs automatically and does not need to be called
249
251
*/
250
252
251
253
export async function optimizeDeps (
@@ -255,6 +257,12 @@ export async function optimizeDeps(
255
257
) : Promise < DepOptimizationMetadata > {
256
258
const log = asCommand ? config . logger . info : debug
257
259
260
+ config . logger . warn (
261
+ colors . yellow (
262
+ 'manually calling optimizeDeps is deprecated. This is done automatically and does not need to be called manually.' ,
263
+ ) ,
264
+ )
265
+
258
266
const environment = new ScanEnvironment ( 'client' , config )
259
267
await environment . init ( )
260
268
You can’t perform that action at this time.
0 commit comments