docs: manual client injection examples reference removed exports
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ó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 74/100
- Loại issue
- Tài liệu
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- javascript
- Lĩnh vực
- documentation
Hướng nghiên cứu
Đọc phần Getting Started dành cho các dự án không có mục nhập HTML và trang Client Script & Client Context, sau đó xem lại commit 352456fb về việc chuyển sang @devframes/hub-ui. Cập nhật cả hai trang để sử dụng mục nhập /__devtools/embedded.js hiện tại, ghi lại các yêu cầu về việc lưu trữ và kết nối của mục nhập này, đồng bộ hóa các ví dụ về chế độ hiển thị; hoàn tất khi các injection exports cũ không còn được tham chiếu.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Describe the bug
The manual client injection documentation still tells users to import @vitejs/devtools/client/inject, although that entry was removed when Vite DevTools adopted the @devframes/hub-ui client.
Affected pages:
This matters for backend-served HTML, middleware integrations, and JavaScript-only entries where automatic HTML injection does not run. Following the documented import fails during module resolution, before the client can initialize.
The @ts-expect-error comment in the guide addresses missing type declarations; it cannot suppress this module-resolution failure.
Reproduction
Using the published package, without building DevTools from source:
mkdir devtools-manual-injection-repro
cd devtools-manual-injection-repro
pnpm init
pnpm add -D -E [email protected] @vitejs/[email protected]
node --input-type=module -e "console.log(import.meta.resolve('@vitejs/devtools/client/inject'))"
Actual result:
ERR_PACKAGE_PATH_NOT_EXPORTED
Package subpath './client/inject' is not defined by "exports"
This is also reproducible through Vite with DevTools explicitly enabled. Create check.mjs:
import { createServer } from 'vite'
import { DevTools } from '@vitejs/devtools'
import { writeFile } from 'node:fs/promises'
await writeFile('old.js', "import '@vitejs/devtools/client/inject'\n")
const server = await createServer({
configFile: false,
plugins: await DevTools({ builtinDevTools: false }),
server: { host: '127.0.0.1', port: 5173, strictPort: true },
devtools: { open: false },
})
try {
await server.listen()
await server.transformRequest('/old.js')
}
finally {
await server.close()
}
Run node check.mjs. The Vite transformation fails with:
"./client/inject" is not exported under the conditions
["module", "browser", "development", "import"]
The published package also does not export ./client/inject-passive or ./client/inject-hidden, both of which are still shown in the guide.
Migration evidence
Commit 352456fb in #529 removed the old client directory and the three injection exports, added @devframes/hub-ui, and changed injection to load the hub-served /__devtools/embedded.js script.
The capability still exists. I verified a backend-served HTML page that loads this script through a same-origin HTTP/WebSocket proxy to Vite: after authorization, the dock appeared and the Settings panel opened. This verifies that setup, not arbitrary cross-origin configurations.
Expected behavior
Please update the manual integration instructions to describe the current supported entry and its hosting/connection requirements, and synchronize the client-context explanation and visibility-mode examples.
The request is to retain and update the manual integration guidance. It does not require restoring the removed npm exports or deleting support for backend-served pages.
Environment
vite: 8.3.0@vitejs/devtools: 0.7.5- Package manager: pnpm
- Reproduced on macOS using published packages.
- Ngôn ngữ chính
- TypeScript
- Star
- 1.2k
- Fork
- 91
- Merge trung bình
- 1 ngày 3 giờ
- Pull request đã merge (30 ngày)
- 21
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của vitejs/devtools
-
Rolldown "Run build with devtools" produces a development build (inherits the dev server's NODE_ENV)Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
vitejs/devtools#261 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
feat(oxc): add rule timing stats to the lint inspectorCó thể đã có người làm @yuyinws đã nhận 7 ngày trước. Đang mởenhancement
vitejs/devtools#584 · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
pending triage
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 58/100
Maintainer thường phản hồi trong vòng 1 ngày
-
pending triage
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
vitejs/devtools#571 · 3 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của vitejs/devtools
Issue tương tự
-
module-request
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Maintainer thường phản hồi trong vòng 1 ngày
-
ports get and web print 'Port N already in use, trying next...' for every busy port they skipĐang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 90/100
appandflow/stim#1604 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 92/100
lingdojo/kana-dojo#31060 · 1 bình luận · 5 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
SSH workspace restore rewrites relative symlinks into the deleted sync-back staging directoryĐang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 90/100
paperclipai/paperclip#14173 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
needs-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
Maintainer thường phản hồi trong vòng 1 ngày