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

feat: disable specific built-in feature (or change it's config)

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

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

Chưa có ai nhận issue này.

Đá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
55/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ệ
typescript
Lĩnh vực
devtools, security

Hướng nghiên cứu

Start by tracing the builtinDevTools configuration and the configResolved hook to find where built-in features, especially terminal, are registered. Compare that path with terminalsVite({ shell: '/usr/bin/nologin' }); done means users can keep other built-in or package devtools enabled while excluding terminal through configuration.

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

Mô tả

enhancement
Clear and concise description of the problem

Hello and thanks to everyone!

I would like to disable the terminal feature. As of today, the only way to do so is by set

devtools: {
      builtinDevTools: false,
},

but this disables all the vite devtools entirely (even the ones from @vitejs/devtools-vite package).

I understand terminal is not active if no authentication is provided, but once it is (and I may want to open devtools for other reasons) I still feel like having it it's a security hole that must be closed. (such terminal is capable of doing too much thing, everything actually - install packages, sudo, reading envs and .bash_history as well as ssh into other machines).

I understand every hole I described can be done in many different way just with a bad package, but at least I would not like to have a terminal in my browser window and potentially accessibile in the network.

I tried to write a custom plugin that hook into the configResolved function to intercept the configuration, but I only managed to entirely disable the tools and I could not manage to reach the configuration.

Suggested solution

From a config perspective, it may be done in different ways, the one I prefer is something like

devtools: {
  builtinDevTools: true,
  excludeBuiltIn: ['terminal']
},
Alternative

Another way can be to override that specific plugin configuration

import { terminalsVite } from '@devframes/plugin-terminals/vite'
//...
plugins: [
  ...terminalsVite({
    shell: '/usr/bin/nologin'
  }),
]
Additional context

I never went that deep into vite: I never needed that (and that thanks to your awesome work, btw!), so I don't know that much of vite internal structure, but if the leading team decides this can be a feature, I can get my hands on it and try to prepare a PR (I feel like it's a small if somewhere, just I don't know where this "somewhere" is)

Validations
Ngôn ngữ chính
TypeScript
Star
1.2k
Fork
92
Merge trung bình
1 ngày 23 giờ
Pull request đã merge (30 ngày)
18

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

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 vitejs/devtools

Tất cả issue của vitejs/devtools

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.