Skip to content

Commit 15b90b3

Browse files
authored
feat(preview): support outDir option (#10418)
1 parent ee7c28a commit 15b90b3

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

packages/vite/src/node/cli.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,7 @@ cli
236236
.option('--strictPort', `[boolean] exit if specified port is already in use`)
237237
.option('--https', `[boolean] use TLS + HTTP/2`)
238238
.option('--open [path]', `[boolean | string] open browser on startup`)
239+
.option('--outDir <dir>', `[string] output directory (default: dist)`)
239240
.action(
240241
async (
241242
root: string,
@@ -245,6 +246,7 @@ cli
245246
https?: boolean
246247
open?: boolean | string
247248
strictPort?: boolean
249+
outDir?: string
248250
} & GlobalCLIOptions
249251
) => {
250252
filterDuplicateOptions(options)
@@ -256,6 +258,9 @@ cli
256258
configFile: options.config,
257259
logLevel: options.logLevel,
258260
mode: options.mode,
261+
build: {
262+
outDir: options.outDir
263+
},
259264
preview: {
260265
port: options.port,
261266
strictPort: options.strictPort,

0 commit comments

Comments
 (0)