`vp dev`& `vp build` break argv passthrough by stripping the `--` separator
维护者通常 1 天内回复
@wan9chi 已经在做这个了。
开始于 2026年7月26日。
评估
这个 Issue 还没有评估数据。
描述
Describe the bug
Every vp CLI layer consumes one -- argument separator, so passthrough args that Vite leaves in process.argv for vite.config.ts to read never arrive. Actually the flags after the stripped -- even get misparsed as Vite positionals.
With plain Vite, vite build -- --app web keeps --app web out of option parsing and visible in process.argv (often sude to parameterize a single hoisted config in a monorepo).
But in vp this is broken:
| Command | Result |
|---|---|
vp build -- --app web |
broken: -- stripped, Vite parses --app web, web becomes the build root (Cannot resolve entry module web/index.html), the project config never loads |
vp build -- -- --app web |
still broken: second -- stripped too |
vp build -- -- -- --app web |
works: config sees ARGV=["build","--","--app","web"] |
So global vp needs three -- where Vite needs one, and a project-local vp needs two.
Expected: vp dev -- --app / vp build -- --app behave exactly like vite dev -- --app — one --, trailing args preserved in the spawned Vite process's process.argv.
Reproduction
See steps below (three files, no dependencies).
Steps to reproduce
mkdir repro && cd repro
cat > package.json <<'PKG'
{ "name": "repro", "private": true, "type": "module" }
PKG
cat > vite.config.ts <<'CFG'
console.log('ARGV=' + JSON.stringify(process.argv.slice(2)));
export default {};
CFG
cat > index.html <<'HTML'
<!doctype html><html><body>hi</body></html>
HTML
vp build -- --app web # fails: Cannot resolve entry module web/index.html, no ARGV log
vp build -- -- -- --app web # works: ARGV=["build","--","--app","web"]
System Info
vp v0.2.2 (global), macOS (Darwin 25.5.0)
Also reproducible on main
Used Package Manager
pnpm
Logs
Validations
- Read the Contributing Guidelines.
- Check that there isn't already an issue for the same bug.
- Confirm this is a Vite+ issue and not an upstream issue (Vite, Vitest, tsdown, Rolldown, or Oxc).
- The provided reproduction is a minimal reproducible example.
- 主要语言
- Rust
- 星标
- 6k
- 派生
- 274
- 平均合并
- 1 天 11 小时
- 30 天内合并 PR
- 211
环境准备
在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
voidzero-dev/vite-plus 的其他 Issue
-
pending triage
难度 2/5 1-3 小时 新手友好度 72/100
voidzero-dev/vite-plus#2882 · 2 条评论 ·
维护者通常 1 天内回复
-
enhancement
难度 2/5 1-3 小时 新手友好度 62/100
voidzero-dev/vite-plus#2097 · 10 条评论 · 2 个 reaction ·
维护者通常 1 天内回复
-
the `vp migrate` command wrongly rewrite "vite/rolldown/plugins" to "vite-plus/rolldown/plugins"可能已有人在做 @Crimson341 今天认领。 未关闭pending triage
难度 3/5 1-2 天 新手友好度 55/100
voidzero-dev/vite-plus#3050 ·
维护者通常 1 天内回复
-
vp migrate crashes with "Undefined meta var" when a migrated config string contains `$`可能已有人在做 @BenjyLimmy 于 1 天前认领。 未关闭bug
voidzero-dev/vite-plus#3045 · 已指派 1 人 ·
维护者通常 1 天内回复
-
Add a dedicated Package Management section with command reference pages可能已有人在做 @jong-kyung 于 2 天前认领。 未关闭documentation
voidzero-dev/vite-plus#3041 · 4 条评论 · 1 个 reaction · 已指派 1 人 ·
维护者通常 1 天内回复
查看 voidzero-dev/vite-plus 的全部 Issue
相似的 Issue
-
area/infra good first issue type/bug
难度 2/5 1-3 小时 新手友好度 60/100
cristim/AztecCraft#92 ·
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 74/100
charles-hood/DiagramCraft#51 ·
-
S: Untriaged T: Bug
难度 2/5 1-3 小时 新手友好度 70/100
libnyanpasu/clash-nyanpasu#5788 ·
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 68/100
维护者通常 1 天内回复
-
area:cli bug good first issue priority:medium
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 1 天内回复