From ee3b90a812e863fc92f485ce53a4e764a2c34708 Mon Sep 17 00:00:00 2001 From: Alexander Perlamutrov Date: Wed, 22 Feb 2023 11:12:07 +0300 Subject: [PATCH] feat(cli): allow to specify sourcemap mode via --sourcemap build's option (#11505) --- docs/guide/cli.md | 2 +- packages/vite/src/node/cli.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/guide/cli.md b/docs/guide/cli.md index 15bac44b26b766..91a894970947a0 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]',