Skip to content

Commit 8c87af7

Browse files
authored
chore: add jsdoc default value (#11746)
1 parent c36fd92 commit 8c87af7

File tree

4 files changed

+19
-1
lines changed

4 files changed

+19
-1
lines changed

packages/vite/src/node/build.ts

+7
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ export interface BuildOptions {
7575
*
7676
* For custom targets, see https://esbuild.github.io/api/#target and
7777
* https://esbuild.github.io/content-types/#javascript for more details.
78+
* @default 'modules'
7879
*/
7980
target?: 'modules' | TransformOptions['target'] | false
8081
/**
@@ -122,6 +123,7 @@ export interface BuildOptions {
122123
* a niche browser that comes with most modern JavaScript features
123124
* but has poor CSS support, e.g. Android WeChat WebView, which
124125
* doesn't support the #RGBA syntax.
126+
* @default target
125127
*/
126128
cssTarget?: TransformOptions['target'] | false
127129
/**
@@ -196,16 +198,19 @@ export interface BuildOptions {
196198
* Build in library mode. The value should be the global name of the lib in
197199
* UMD mode. This will produce esm + cjs + umd bundle formats with default
198200
* configurations that are suitable for distributing libraries.
201+
* @default false
199202
*/
200203
lib?: LibraryOptions | false
201204
/**
202205
* Produce SSR oriented build. Note this requires specifying SSR entry via
203206
* `rollupOptions.input`.
207+
* @default false
204208
*/
205209
ssr?: boolean | string
206210
/**
207211
* Generate SSR manifest for determining style links and asset preload
208212
* directives in production.
213+
* @default false
209214
*/
210215
ssrManifest?: boolean | string
211216
/**
@@ -217,6 +222,7 @@ export interface BuildOptions {
217222
/**
218223
* Set to false to disable reporting compressed chunk sizes.
219224
* Can slightly improve build speed.
225+
* @default true
220226
*/
221227
reportCompressedSize?: boolean
222228
/**
@@ -227,6 +233,7 @@ export interface BuildOptions {
227233
/**
228234
* Rollup watch options
229235
* https://rollupjs.org/configuration-options/#watch
236+
* @default null
230237
*/
231238
watch?: WatcherOptions | null
232239
}

packages/vite/src/node/plugins/resolve.ts

+9
Original file line numberDiff line numberDiff line change
@@ -62,15 +62,24 @@ const debug = createDebugger('vite:resolve-details', {
6262
})
6363

6464
export interface ResolveOptions {
65+
/**
66+
* @default ['module', 'jsnext:main', 'jsnext']
67+
*/
6568
mainFields?: string[]
6669
/**
6770
* @deprecated In future, `mainFields` should be used instead.
6871
* @default true
6972
*/
7073
browserField?: boolean
7174
conditions?: string[]
75+
/**
76+
* @default ['.mjs', '.js', '.mts', '.ts', '.jsx', '.tsx', '.json']
77+
*/
7278
extensions?: string[]
7379
dedupe?: string[]
80+
/**
81+
* @default false
82+
*/
7483
preserveSymlinks?: boolean
7584
}
7685

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

+1
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ export interface ServerOptions extends CommonServerOptions {
9292
watch?: WatchOptions
9393
/**
9494
* Create Vite dev server to be used as a middleware in an existing server
95+
* @default false
9596
*/
9697
middlewareMode?: boolean | 'html' | 'ssr'
9798
/**

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

+2-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ export interface SSROptions {
1111
/**
1212
* Define the target for the ssr build. The browser field in package.json
1313
* is ignored for node but used if webworker is the target
14-
* Default: 'node'
14+
* @default 'node'
1515
*/
1616
target?: SSRTarget
1717
/**
@@ -20,6 +20,7 @@ export interface SSROptions {
2020
* left marked as experimental to give users more time to update to ESM. CJS builds requires
2121
* complex externalization heuristics that aren't present in the ESM format.
2222
* @experimental
23+
* @default 'esm'
2324
*/
2425
format?: SSRFormat
2526
/**

0 commit comments

Comments
 (0)