|
|
@ -16,14 +16,14 @@ vitepress dev [root]
|
|
|
|
|
|
|
|
|
|
|
|
### Options
|
|
|
|
### Options
|
|
|
|
|
|
|
|
|
|
|
|
| Option | Description |
|
|
|
|
| Option | Description |
|
|
|
|
| - | - |
|
|
|
|
| --------------- | ----------------------------------------------------------------- |
|
|
|
|
| `--open [path]` | Open browser on startup (`boolean \| string`) |
|
|
|
|
| `--open [path]` | Open browser on startup (`boolean \| string`) |
|
|
|
|
| `--port <port>` | Specify port (`number`) |
|
|
|
|
| `--port <port>` | Specify port (`number`) |
|
|
|
|
| `--base <path>` | Public base path (default: `/`) (`string`) |
|
|
|
|
| `--base <path>` | Public base path (default: `/`) (`string`) |
|
|
|
|
| `--cors` | Enable CORS |
|
|
|
|
| `--cors` | Enable CORS |
|
|
|
|
| `--strictPort` | Exit if specified port is already in use (`boolean`) |
|
|
|
|
| `--strictPort` | Exit if specified port is already in use (`boolean`) |
|
|
|
|
| `--force` | Force the optimizer to ignore the cache and re-bundle (`boolean`) |
|
|
|
|
| `--force` | Force the optimizer to ignore the cache and re-bundle (`boolean`) |
|
|
|
|
|
|
|
|
|
|
|
|
## `vitepress build`
|
|
|
|
## `vitepress build`
|
|
|
|
|
|
|
|
|
|
|
@ -37,14 +37,14 @@ vitepress build [root]
|
|
|
|
|
|
|
|
|
|
|
|
### Options
|
|
|
|
### Options
|
|
|
|
|
|
|
|
|
|
|
|
| Option | Description |
|
|
|
|
| Option | Description |
|
|
|
|
| - | - |
|
|
|
|
| ------------------------------ | ------------------------------------------------------------------------------------------------------------------- |
|
|
|
|
| `--mpa` (experimental) | Build in [MPA mode](../guide/mpa-mode) without client-side hydration (`boolean`) |
|
|
|
|
| `--mpa` (experimental) | Build in [MPA mode](../guide/mpa-mode) without client-side hydration (`boolean`) |
|
|
|
|
| `--base <path>` | Public base path (default: `/`) (`string`) |
|
|
|
|
| `--base <path>` | Public base path (default: `/`) (`string`) |
|
|
|
|
| `--target <target>` | Transpile target (default: `"modules"`) (`string`) |
|
|
|
|
| `--target <target>` | Transpile target (default: `"modules"`) (`string`) |
|
|
|
|
| `--outDir <dir>` | Output directory (default: `.vitepress/dist`) (`string`) |
|
|
|
|
| `--outDir <dir>` | Output directory relative to **cwd** (default: `<root>/.vitepress/dist`) (`string`) |
|
|
|
|
| `--minify [minifier]` | Enable/disable minification, or specify minifier to use (default: `"esbuild"`) (`boolean \| "terser" \| "esbuild"`) |
|
|
|
|
| `--minify [minifier]` | Enable/disable minification, or specify minifier to use (default: `"esbuild"`) (`boolean \| "terser" \| "esbuild"`) |
|
|
|
|
| `--assetsInlineLimit <number>` | Static asset base64 inline threshold in bytes (default: `4096`) (`number`) |
|
|
|
|
| `--assetsInlineLimit <number>` | Static asset base64 inline threshold in bytes (default: `4096`) (`number`) |
|
|
|
|
|
|
|
|
|
|
|
|
## `vitepress preview`
|
|
|
|
## `vitepress preview`
|
|
|
|
|
|
|
|
|
|
|
@ -58,10 +58,10 @@ vitepress preview [root]
|
|
|
|
|
|
|
|
|
|
|
|
### Options
|
|
|
|
### Options
|
|
|
|
|
|
|
|
|
|
|
|
| Option | Description |
|
|
|
|
| Option | Description |
|
|
|
|
| - | - |
|
|
|
|
| --------------- | ------------------------------------------ |
|
|
|
|
| `--base <path>` | Public base path (default: `/`) (`string`) |
|
|
|
|
| `--base <path>` | Public base path (default: `/`) (`string`) |
|
|
|
|
| `--port <port>` | Specify port (`number`) |
|
|
|
|
| `--port <port>` | Specify port (`number`) |
|
|
|
|
|
|
|
|
|
|
|
|
## `vitepress init`
|
|
|
|
## `vitepress init`
|
|
|
|
|
|
|
|
|
|
|
|