MCPcopy
hub / github.com/vitejs/vite / UserConfig

Interface UserConfig

packages/vite/src/node/config.ts:352–535  ·  packages/vite/src/node/config.ts::UserConfig

Source from the content-addressed store, hash-verified

350}
351
352export interface UserConfig extends DefaultEnvironmentOptions {
353 /**
354 * Project root directory. Can be an absolute path, or a path relative from
355 * the location of the config file itself.
356 * @default process.cwd()
357 */
358 root?: string
359 /**
360 * Base public path when served in development or production.
361 * @default class="st">'/'
362 */
363 base?: string
364 /**
365 * Directory to serve as plain static assets. Files in this directory are
366 * served and copied to build dist dir as-is without transform. The value
367 * can be either an absolute file system path or a path relative to project root.
368 *
369 * Set to `false` or an empty string to disable copied static assets to build dist dir.
370 * @default class="st">'public'
371 */
372 publicDir?: string | false
373 /**
374 * Directory to save cache files. Files in this directory are pre-bundled
375 * deps or some other cache files that generated by vite, which can improve
376 * the performance. You can use `--force` flag or manually delete the directory
377 * to regenerate the cache files. The value can be either an absolute file
378 * system path or a path relative to project root.
379 * Default to `.vite` when no `package.json` is detected.
380 * @default class="st">'node_modules/.vite'
381 */
382 cacheDir?: string
383 /**
384 * Explicitly set a mode to run in. This will override the default mode for
385 * each command, and can be overridden by the command line --mode option.
386 */
387 mode?: string
388 /**
389 * Array of vite plugins to use.
390 */
391 plugins?: PluginOption[]
392 /**
393 * HTML related options
394 */
395 html?: HTMLOptions
396 /**
397 * CSS related options (preprocessors and CSS modules)
398 */
399 css?: CSSOptions
400 /**
401 * JSON loading options
402 */
403 json?: JsonOptions
404 /**
405 * Transform options to pass to esbuild.
406 * Or set to `false` to disable esbuild.
407 *
408 * @deprecated Use `oxc` option instead.
409 */

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected