Configuring Vite+
Vite+ keeps project configuration in one place: vite.config.ts, allowing you to consolidate many top-level configuration files in a single file. You can keep using your Vite configuration such as server or build, and add Vite+ blocks for the rest of your workflow:
import { defineConfig } from 'vite-plus';
export default defineConfig({
server: {},
build: {},
preview: {},
create: {},
run: {},
fmt: {},
lint: {},
check: {},
test: {},
pack: {},
staged: {},
});Vite+ Specific Configuration
Vite+ extends the basic Vite configuration with these additions:
createfor project and template scaffolding defaultsrunfor Vite Taskfmtfor Oxfmtlintfor Oxlintcheckforvp checkdefaultstestfor Vitestpackfor tsdownstagedfor staged-file checksdefaultPackagefor the default target of bare app commands at a workspace root
defaultPackage
Default target directory for vp dev / vp build / vp preview / vp pack when they are invoked bare in the directory containing the config, an implicit vp -C <dir>:
export default {
defaultPackage: './frontend',
};The value must be a static string literal: vp reads it without executing the config, so it also works at repository roots without a vite-plus install (for example a Laravel or Rails repo whose Vite app lives in frontend/). An explicit -C or positional target always wins over the config.