Skip to content

Commit ee3b90a

Browse files
authoredFeb 22, 2023
feat(cli): allow to specify sourcemap mode via --sourcemap build's option (#11505)
1 parent 9d42f06 commit ee3b90a

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed
 

‎docs/guide/cli.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ vite build [root]
5454
| `--assetsDir <dir>` | Directory under outDir to place assets in (default: `"assets"`) (`string`) |
5555
| `--assetsInlineLimit <number>` | Static asset base64 inline threshold in bytes (default: `4096`) (`number`) |
5656
| `--ssr [entry]` | Build specified entry for server-side rendering (`string`) |
57-
| `--sourcemap` | Output source maps for build (default: `false`) (`boolean`) |
57+
| `--sourcemap [output]` | Output source maps for build (default: `false`) (`boolean \| "inline" \| "hidden"`) |
5858
| `--minify [minifier]` | Enable/disable minification, or specify minifier to use (default: `"esbuild"`) (`boolean \| "terser" \| "esbuild"`) |
5959
| `--manifest [name]` | Emit build manifest json (`boolean \| string`) |
6060
| `--ssrManifest [name]` | Emit ssr manifest json (`boolean \| string`) |

‎packages/vite/src/node/cli.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -212,8 +212,8 @@ cli
212212
`[string] build specified entry for server-side rendering`,
213213
)
214214
.option(
215-
'--sourcemap',
216-
`[boolean] output source maps for build (default: false)`,
215+
'--sourcemap [output]',
216+
`[boolean | "inline" | "hidden"] output source maps for build (default: false)`,
217217
)
218218
.option(
219219
'--minify [minifier]',

0 commit comments

Comments
 (0)
Please sign in to comment.