Hacktoberfest 2026: as issues que os mantenedores marcaram para outubro, abertas e boas para iniciantes. Ver issues do Hacktoberfest

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

Fechada
#3,152 0 comentários 0 reações 1 responsável Ver no GitHub

Mantenedores costumam responder em até 1 dia

@liangmiQwQ já está trabalhando nisso.

Desde 20/10/2026.

  • #3154 de @liangmiQwQ — integrado

Avaliação

Esta issue ainda não foi avaliada.

Descrição

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

Linguagem predominante
Rust
Estrelas
6.3k
Forks
283
Merge médio
1d 12h
PRs com merge (30d)
235

Preparar o ambiente

Abrir no Codespaces

Inicia o contêiner de desenvolvimento do projeto no navegador, com a sua própria conta do GitHub.

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de voidzero-dev/vite-plus

Todas as issues de voidzero-dev/vite-plus

Issues semelhantes

Mais issues de Rust

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.