Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

`vp dev`& `vp build` break argv passthrough by stripping the `--` separator

Đang mở
#2,250 0 bình luận 0 reaction 2 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

@wan9chi đang làm issue này rồi.

Từ ngày 26/7/2026.

Đánh giá

Issue này chưa được đánh giá.

Mô tả

bug
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
Ngôn ngữ chính
Rust
Star
6k
Fork
274
Merge trung bình
1 ngày 13 giờ
Pull request đã merge (30 ngày)
195

Chuẩn bị môi trường

Mở trong Codespaces

Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của voidzero-dev/vite-plus

Tất cả issue của voidzero-dev/vite-plus

Issue tương tự

Thêm issue về Rust

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.