This document describes how boolean flags work in vite-plus commands.
All boolean flags in vite-plus support a negation pattern using the --no- prefix. When a --no-* flag is used, it explicitly sets the corresponding boolean option to false.
--debug/--no-debug- Enable or disable cache debugging output- Short form:
-d(only for positive form)
- Short form:
-
--recursive/--no-recursive- Enable or disable recursive task execution across all packages- Short form:
-r(only for positive form)
- Short form:
-
--parallel/--no-parallel- Enable or disable parallel task execution- Short form:
-p(only for positive form)
- Short form:
-
--sequential/--no-sequential- Enable or disable sequential task execution- Short form:
-s(only for positive form)
- Short form:
-
--topological/--no-topological- Enable or disable topological ordering based on package dependencies- Short form:
-t(only for positive form)
- Short form:
The positive and negative forms of a flag are mutually exclusive. You cannot use both --flag and --no-flag in the same command:
# This will result in an error
vp run --recursive --no-recursive buildWhen only the negative form is used, it takes precedence and explicitly sets the value to false:
# Explicitly disable topological ordering
vp run build -r --no-topologicalThe negative flags are particularly useful for overriding default behaviors:
--recursivewith--no-topological: By default, recursive runs enable topological ordering. Use--no-topologicalto disable it:# Recursive run WITHOUT topological ordering vp run build -r --no-topological
# Run with debugging disabled (useful if debug is enabled by default in config)
vp --no-debug build
# Recursive build without topological ordering
vp run build --recursive --no-topological
# Explicitly disable parallel execution
vp run build --no-parallel
# Run tests sequentially, not in parallel
vp run test --no-parallelThe --no-* flags use clap's conflicts_with attribute to ensure they cannot be used together with their positive counterparts. When processing flags, vite-plus uses a resolve_bool_flag function that gives precedence to the negative form when present.
This pattern provides a consistent and intuitive way to explicitly disable features that might be enabled by default or through configuration files.