[EVAL] Direct `eval` warning from @protobufjs/inquire during Vite 8 build
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
- 48/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Ít trao đổi
- Công nghệ
- typescript, vite
- Lĩnh vực
- build-system, frontend
Hướng nghiên cứu
Start in vite.config and reproduce the Vite 8/Rolldown build to confirm the warning from node_modules/@protobufjs/inquire/index.js:12. Compare the suppression and browser-alias options described in the issue, then verify that the build succeeds without this warning and that browser behavior is unchanged.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Warning
During the build/dev process (Vite 8 / Rolldown), the following warning appears:
[EVAL] Use of direct `eval` function is strongly discouraged as it poses security risks and may cause issues with minification.
╭─[ node_modules/@protobufjs/inquire/index.js:12:19 ]
│
12 │ var mod = eval("quire".replace(/^/,"re"))(moduleName); // eslint-disable-line no-eval
│ ──┬─
│ ╰─── Use of direct `eval` here.
│
│ Help: Consider using indirect eval. For more information, check the documentation: https://rolldown.rs/guide/troubleshooting#avoiding-direct-eval
────╯
Source
The eval call lives in @protobufjs/inquire (a transitive dependency pulled in via protobufjs, used by our Cosmos/protobuf tooling). It uses direct eval to conditionally require optional native modules in Node — code that is never actually needed in the browser bundle.
This is a third-party dependency, not our own code, so we can't fix the source directly. The warning is emitted by Rolldown (the bundler behind Vite 8) which flags direct eval because it defeats minification/scope analysis.
Impact
- Cosmetic warning only — build still succeeds.
- No runtime security risk in our bundle (the
evalpath is dead code in the browser).
Possible remediations
- Suppress the warning — configure Vite/Rolldown to ignore this specific warning for the
@protobufjs/inquiremodule. - Alias/stub the module — since
inquireis only for optional Node-only native modules, alias@protobufjs/inquireto an empty/no-op module invite.configresolve.alias for browser builds. - Wait for upstream — track whether
protobufjs/@protobufjs/inquiremoves to indirect eval.
References
- Rolldown troubleshooting: https://rolldown.rs/guide/troubleshooting#avoiding-direct-eval
- Offending file:
node_modules/@protobufjs/inquire/index.js:12
- Ngôn ngữ chính
- TypeScript
- Star
- 2
- Fork
- 5
- Merge trung bình
- 22 giờ 35 phút
- Pull request đã merge (30 ngày)
- 91
Chuẩn bị môi trường
Chúng tôi chưa kiểm tra các tệp thiết lập môi trường của dự án này. Hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
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 block52/ui
-
guards: accept readonly arrays (and other array-likes) in isEmpty / hasElements / safeLengthĐang mởenhancement tech debt
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
feat(ui): player notes and tags — click a seat to note a player; tag icons (fish, shark, tight, loose…) show by their pillCó thể đã có người làm @Dzeezbtc đã nhận 1 ngày trước. Đang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
Maintainer thường phản hồi trong vòng 1 ngày
-
chore(ui): move existing inline null/empty and typeof checks to the guardsCó thể đã có người làm @bitcoinbrisbane đã nhận 1 ngày trước. Đang mởrefactor tech debt UI
block52/ui#937 · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
architecture refactor tech debt
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 55/100
Maintainer thường phản hồi trong vòng 1 ngày
Issue tương tự
-
Remove unused dependenciesCó thể đã có người làm @alastair-smith đã nhận hôm nay. Đang mởchore other
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
alastair-smith/card-games#384 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
code-yeongyu/senpi#5571 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
nexu-io/open-design#9262 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
friction
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
kentcdodds/kody#4753 ·
-
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 62/100
lingdojo/kana-dojo#33508 · 1 bình luận · 5 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày