Allow disabling dlx function globally with vpx

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

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

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

Từ ngày 5/10/2026.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
48/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
rust
Lĩnh vực
cli

Hướng nghiên cứu

Start by locating the vpx binary-resolution path in the CLI crate — the point where a missing local binary falls back to downloading from npm and executing. The config schema needs the new vpxDlxBehaviour option (allow/ask/deny), with non-interactive environments treating ask as deny, while vp dlx keeps its current behaviour. Read CONTRIBUTING.md for build and test steps; done means vpx cowsay prints the suggested message under deny and existing dlx tests still pass.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

contribution welcome enhancement
Description

Basically same as what Nub does https://x.com/colinhacks/status/2099827579817779683
When the config is set, if the current project doesn't have the bin installed and the user tries to do vpx <something>, don't try to download it from npm and execute

Suggested solution

there can be option like vpxDlxBehaviour = allow(default) | ask | deny which will figure out what needs to be done when vpx is invoked with a not installed package, in non interactive envs like for agents, ask will deny, vp dlx will still work, but its a more conscious choice which is saying download and execute this from npm

$ vpx cowsay

`cowsay` is not a installed binary in this project, if you meant to execute `cowsay` from npm, use `vp dlx cowsay`
Alternative

Hope you don't typo the package name or use the wrong binary name,
I have done it most with typescript, where I don't have typescript installed, I try to do vpx tsc which resolves to tsc on npm (which is a placeholder that warns about this exact thing)

Additional context

No response

Validations
  • Read the Contributing Guidelines.
  • Confirm this request is for Vite+ itself and not for Vite, Vitest, tsdown, Rolldown, or Oxc.
  • Check that there isn't already an issue requesting the same feature.
Ngôn ngữ chính
TypeScript
Star
6.6k
Fork
303
Merge trung bình
1 ngày 5 giờ
Pull request đã merge (30 ngày)
212

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ề TypeScript

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.