Open

Description
Describe the bug
The vitepress build script recognizes the --outDir argument. For example,
- default script:
"docs:build": "vitepress build"
builds the./.vitepress/dist
folder; - custom script:
"docs:build": "vitepress build --outDir './dist"'
builds the./dist
folder.
However, the vitepress preview script cannot locally preview the project in a different folder. For example,
- default script:
"docs:preview": "vitepress preview"
considers the./.vitepress/dist
folder; - custom script: there is no way to preview the project that was built on the
./dist
folder.
Workaround: setting '../dist'
as the value of outDir
option on config.js
satisfies the expected result when running vitepress preview
. The considered folder becomes ./dist
as expected.
Reproduction
https://stackblitz.com/edit/vite-tyd3c7?file=package.json
Expected behavior
The script docs:preview
correctly recognizes the modified outDir
folder.