defineConfig drops own properties of Promise plugins (breaks Vike discovery)
Maintainer thường phản hồi trong vòng 1 ngày
Đánh giá
Issue này chưa được đánh giá.
Mô tả
What
withoutVitePlusTestPlugins maps plugin instanceof Promise to plugin.then(withoutVitePlusTestPlugins). .then() creates a new promise that does not carry the original promise's own properties.
Impact
vike() (vike/[email protected]) returns a Promise carrying _vikeVitePluginOptions as an own property — verified present on the promise itself and absent from all 41 resolved plugins. Vike discovers its plugin by scanning the raw user config for that field, so after vp's re-wrap the field is gone: vike build warns Omitting Vike's Vite plugin and then fails inside @brillout/vite-plugin-server-entry (resolveConfig).
Current workaround is a sync marker object that copies the field (awaiting first is not an option — it destroys the marker; a lazy async factory reintroduces the same failure since it yields [Promise]).
Ask
Preserve own props across the re-wrap (e.g. copy them onto the settled wrapper), or document that Promise plugins must be prop-free so downstream authors know to use a marker.
Repro
// vite.config.ts (loaded through vp's defineConfig)
import { defineConfig } from 'vite-plus';
import vike from 'vike/plugin';
export default defineConfig({ plugins: [vike()] });
vike build fails as above. The identical config through vite's own defineConfig builds fine.
Versions
vite-plus 1.3.0, vike 0.4.268, vite-plus-core 1.3.0
- Ngôn ngữ chính
- Rust
- Star
- 6.3k
- Fork
- 283
- Merge trung bình
- 1 ngày 16 giờ
- Pull request đã merge (30 ngày)
- 214
Chuẩn bị môi trường
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.
- Không có Dockerfile hay tệp Docker Compose
- Không 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 voidzero-dev/vite-plus
-
pending triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
voidzero-dev/vite-plus#2882 · 2 bình luận ·
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 62/100
voidzero-dev/vite-plus#2097 · 10 bình luận · 2 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
vpx: watch reports for `vpx --watch`, and `vpx watch` on oxc-node's watcherCó thể đã có người làm @fengmk2 đã nhận hôm nay. Đang mở
voidzero-dev/vite-plus#3141 · 1 reaction · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Document cross-platform `FOO=bar cmd` in task commands and scriptsCó thể đã có người làm @hyunbinseo đã nhận hôm nay. Đang mởdocumentation
voidzero-dev/vite-plus#3140 · 2 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
voidzero-dev/vite-plus#3137 · 3 bình luận · 1 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của voidzero-dev/vite-plus
Issue tương tự
-
meta.json, text.txt and try JSON are written non-atomicallyCó thể đã có người làm @qwertymuzaffar đã nhận hôm nay. Đang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
qwertymuzaffar/parrot#47 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Alt select PhotocraftĐang mởpriority: medium
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
storytold/photocraft#8041 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
fmt -p: an unprefixed last line without a newline gets one addedCó thể đã có người làm @fixfon đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
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 68/100
jhspetersson/fselect#187 ·
-
documentation good first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
writerslogic/holographic-memory#96 ·
Maintainer thường phản hồi trong vòng 1 ngày