Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

defineConfig drops own properties of Promise plugins (breaks Vike discovery)

Chiusa
#3,152 0 commenti 0 reazioni 1 assegnatario Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@liangmiQwQ ci sta già lavorando.

Dal 20/10/2026.

  • #3154 di @liangmiQwQ — integrata

Valutazione

Questa issue non è ancora stata valutata.

Descrizione

bug

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

Lingua principale
Rust
Stelle
6.3k
Fork
283
Merge medio
1g 14h
PR unite (30g)
231

Preparare l'ambiente

Apri in Codespaces

Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di voidzero-dev/vite-plus

Tutte le issue di voidzero-dev/vite-plus

Issue simili

Altre issue su Rust

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.