Skip to content

Commit 4dab15e

Browse files
authored
refactor: deprecate esbuild / optimizeDeps.esbuild options (#355)
1 parent 2008da5 commit 4dab15e

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

packages/vite/src/node/config.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -372,6 +372,8 @@ export interface UserConfig extends DefaultEnvironmentOptions {
372372
/**
373373
* Transform options to pass to esbuild.
374374
* Or set to `false` to disable esbuild.
375+
*
376+
* @deprecated Use `oxc` option instead.
375377
*/
376378
esbuild?: ESBuildOptions | false
377379
/**
@@ -626,6 +628,7 @@ export interface ResolvedConfig
626628
plugins: readonly Plugin[]
627629
css: ResolvedCSSOptions
628630
json: Required<JsonOptions>
631+
/** @deprecated Use `oxc` option instead. */
629632
esbuild: ESBuildOptions | false
630633
oxc: OxcOptions | false
631634
server: ResolvedServerOptions

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

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,8 @@ export interface DepOptimizationConfig {
9595
* - `plugins` are merged with Vite's dep plugin
9696
*
9797
* https://esbuild.github.io/api
98+
*
99+
* @deprecated Use `rolldownOptions` instead.
98100
*/
99101
esbuildOptions?: DepsOptimizerEsbuildOptions
100102
/**
@@ -106,6 +108,14 @@ export interface DepOptimizationConfig {
106108
'format' | 'sourcemap' | 'dir' | 'banner'
107109
>
108110
}
111+
/**
112+
* Options to pass to rolldown during the dep scanning and optimization
113+
*
114+
* Certain options are omitted since changing them would not be compatible
115+
* with Vite's dep optimization.
116+
*
117+
* - `plugins` are merged with Vite's dep plugin
118+
*/
109119
rolldownOptions?: Omit<RolldownOptions, 'input' | 'logLevel' | 'output'> & {
110120
output?: Omit<
111121
RolldownOutputOptions,

0 commit comments

Comments
 (0)