defineConfig drops own properties of Promise plugins (breaks Vike discovery)
Maintainers usually reply within 1 day
Assessment
This issue has not been assessed yet.
Description
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
- Dominant language
- Rust
- Stars
- 6.3k
- Forks
- 283
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 231
Getting set up
Starts the project's dev container in your browser, under your own GitHub account.
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from voidzero-dev/vite-plus
-
pending triage
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
voidzero-dev/vite-plus#2882 · 2 comments ·
Maintainers usually reply within 1 day
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
voidzero-dev/vite-plus#2097 · 10 comments · 2 reactions ·
Maintainers usually reply within 1 day
-
`pnpm create vite-plus` and `yarn create vite-plus` fail with `spawn vp ENOENT` when `vp` is not on PATHPossibly taken @fengmk2 claimed this today. Openbug
voidzero-dev/vite-plus#3177 · 1 reaction · 1 assignee ·
Maintainers usually reply within 1 day
-
vp migrate doesn't flag esbuild-specific config (minify: "esbuild") — migrated project fails to build on Vite 8Possibly taken @john-okeefe claimed this today. Opencontribution welcome
voidzero-dev/vite-plus#3176 · 1 reaction · 1 assignee ·
Maintainers usually reply within 1 day
-
`vp run`: scripts get a non-blocking stdin (EAGAIN) when `run` tasks in vite.config.ts use constantsOpenpending triage
Difficulty 4/5 3-5 days Newbie friendliness 55/100
voidzero-dev/vite-plus#3155 ·
Maintainers usually reply within 1 day
All issues in voidzero-dev/vite-plus
Similar issues
-
llm translation
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
BerriAI/litellm#47884 · 1 comment ·
Maintainers usually reply within 1 day
-
bug(stubgen): `typing` / `_typeshed` imports are emitted above `from __future__ import annotations`Openstubgen
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 2 days
-
bug-hunt confirmed good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day
-
area: pcb area: rendering priority: high status: needs-triage type: bug
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
rustls/rustls-platform-verifier#262 · 2 comments · 2 reactions ·