diff --git a/docs/guide/cli.md b/docs/guide/cli.md
index 3cf679211af8c2..a60030525ba2b2 100644
--- a/docs/guide/cli.md
+++ b/docs/guide/cli.md
@@ -54,7 +54,7 @@ vite build [root]
| `--assetsDir
` | Directory under outDir to place assets in (default: `"assets"`) (`string`) |
| `--assetsInlineLimit ` | Static asset base64 inline threshold in bytes (default: `4096`) (`number`) |
| `--ssr [entry]` | Build specified entry for server-side rendering (`string`) |
-| `--sourcemap` | Output source maps for build (default: `false`) (`boolean`) |
+| `--sourcemap [output]` | Output source maps for build (default: `false`) (`boolean \| "inline" \| "hidden"`) |
| `--minify [minifier]` | Enable/disable minification, or specify minifier to use (default: `"esbuild"`) (`boolean \| "terser" \| "esbuild"`) |
| `--manifest [name]` | Emit build manifest json (`boolean \| string`) |
| `--ssrManifest [name]` | Emit ssr manifest json (`boolean \| string`) |
diff --git a/packages/vite/src/node/cli.ts b/packages/vite/src/node/cli.ts
index 460fb0e5690f56..ac9f5945c1a2f2 100644
--- a/packages/vite/src/node/cli.ts
+++ b/packages/vite/src/node/cli.ts
@@ -212,8 +212,8 @@ cli
`[string] build specified entry for server-side rendering`,
)
.option(
- '--sourcemap',
- `[boolean] output source maps for build (default: false)`,
+ '--sourcemap [output]',
+ `[boolean | "inline" | "hidden"] output source maps for build (default: false)`,
)
.option(
'--minify [minifier]',