Configuration
Pass Vue tooling settings directly to withVue in vite.config.* and keep TypeScript settings in
tsconfig.json. The CLI, Vite integration and editor extension read these project
files. No dedicated Vize configuration is needed.
See Shared Vue configuration for complete project examples.
Keep your Vite+ configuration
Use the Vize helper around your existing configuration:
import { defineConfig } from "@vizejs/vite-plugin/vite-plus";
export default defineConfig({
server: { port: 3000 },
}).withVue({
compiler: { sourceMap: true },
linter: { preset: "essential" },
formatter: { printWidth: 100 },
});
Chain withVue directly on the exported defineConfig call. It keeps the existing Vite+ options,
plugins and hooks. Config objects,
functions, promises and async functions are supported. An inline vue: { ... }
section is equivalent. See Shared Vue configuration for
paths, scoped entries and composition.
TypeScript and Vue template checking
Keep the existing TypeScript project, including its standard extends and
references. Put Vue template compiler options in vueCompilerOptions:
{
"compilerOptions": {
"strict": true,
"noEmit": true,
"jsx": "preserve"
},
"vueCompilerOptions": {
"strictTemplates": true
},
"include": ["src/**/*"]
}
Existing projects using vue-tsc can retain their TypeScript project layout.
compilerOptions remains the authority for TypeScript strictness; Vue-specific
options belong in vueCompilerOptions. See the reference
for the supported Vue options and explicit Vize overrides.
Lint Rule Options
Change individual rules with vue.linter.rules. See Rule Options for complete typed options.
import { defineConfig } from "@vizejs/vite-plugin/vite-plus";
export default defineConfig({
lint: { rules: { "no-debugger": "error" } },
}).withVue({
linter: { rules: { "vue/no-v-html": "error" } },
});
Direct Vite configuration
Use the same direct withVue chain when the project only adopts linting or formatting:
import { defineConfig } from "@vizejs/vite-plugin/vite-plus";
export default defineConfig({}).withVue({
linter: { preset: "essential" },
formatter: { printWidth: 100 },
});
CLI and editor
Run commands from the target package root. The editor resolves each document's
project inside the selected workspace and reads its Vite and TypeScript settings.
A monorepo package keeps its own tsconfig.json, references and Vite configuration.
Use --tsconfig to select another TypeScript project explicitly.
Type-check with the content mapper: tsc --runExternalCode --noEmit, or tsrs --runExternalCode --noEmit on the same tsconfig.json. The commands below are the packaged CLI.
vp exec vize check
vp exec vize lint src
vp exec vize fmt --check src
Native relative paths in the Vite configuration use the selected Vite root.
A relative root resolves from the configuration directory. Explicit CLI file
arguments and --tsconfig remain relative to the command's working directory.
CLI feature flags and explicit editor feature switches override shared settings.
Migrate removed configuration
vize.config.* and top-level vize: configuration are no longer supported.
Move their native settings to vue: in vite.config.*, and TypeScript project
options to tsconfig.json. Remove dedicated configuration files after migrating
and checking the result. A leftover dedicated file alongside a Vite config is an
error, the same migration error as a dedicated-only project. vize init and
vize setup preserve the original files and explain the migration.
There is no Vize-specific extends. Keep the root and Vue settings in the direct
defineConfig({ ... }).withVue({ ... }) export shown above. Standard
TypeScript extends and project references continue to work.
See Shared Vue configuration, the configuration reference and the compiler reference for individual options.
See Experimentals for optional project features.
Note
The CLI and editor use the existing Vite and TypeScript project files. Migrate removed dedicated configuration before deleting it.