Optional app'spa'
Optional assetsSpecify additional picomatch patterns to be treated as static assets.
Optional baseBase public path when served in development or production.
'/'
Optional buildBuild specific options
Optional cacheDirectory to save cache files. Files in this directory are pre-bundled
deps or some other cache files that generated by vite, which can improve
the performance. You can use --force flag or manually delete the directory
to regenerate the cache files. The value can be either an absolute file
system path or a path relative to project root.
Default to .vite when no package.json is detected.
'node_modules/.vite'
Optional cleartrue
Optional cssCSS related options (preprocessors and CSS modules)
Optional customCustom logger.
Optional defineDefine global variable replacements.
Entries will be defined on window during dev and replaced during build.
Optional envEnvironment files directory. Can be an absolute path, or a path relative from root.
root
Optional envEnv variables starts with envPrefix will be exposed to your client source code via import.meta.env.
'VITE_'
Optional esbuildTransform options to pass to esbuild.
Or set to false to disable esbuild.
Optional Experimental experimentalExperimental features
Features under this field could change in the future and might NOT follow semver. Please be careful and always pin Vite's version when using them.
Optional jsonJSON loading options
Optional legacyLegacy options
Features under this field only follow semver for patches, they could be removed in a future minor version. Please always pin Vite's version to a minor when using them.
Optional logLog level.
'info'
Optional modeExplicitly set a mode to run in. This will override the default mode for each command, and can be overridden by the command line --mode option.
Optional optimizeDep optimization options
Optional pluginsArray of vite plugins to use.
Optional previewPreview specific options, e.g. host, port, https...
Optional publicDirectory to serve as plain static assets. Files in this directory are served and copied to build dist dir as-is without transform. The value can be either an absolute file system path or a path relative to project root.
Set to false or an empty string to disable copied static assets to build dist dir.
'public'
Optional resolveConfigure resolver
Optional alias?: AliasOptionsOptional rootProject root directory. Can be an absolute path, or a path relative from the location of the config file itself.
process.cwd()
Optional serverServer specific options, e.g. host, port, https...
Optional ssrSSR specific options
Optional testOptional workerWorker bundle options
Optional format?: "iife" | "es"Output format for worker bundle
'iife'
Optional plugins?: (() => PluginOption[])Vite plugins that apply to worker bundle. The plugins returned by this function should be new instances every time it is called, because they are used for each rollup worker bundling process.
Vite plugins that apply to worker bundle. The plugins returned by this function should be new instances every time it is called, because they are used for each rollup worker bundling process.
Optional rollupRollup options to build worker bundle
Generated using TypeDoc
Whether your application is a Single Page Application (SPA), a Multi-Page Application (MPA), or Custom Application (SSR and frameworks with custom HTML handling)