You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
defineConfig drops own properties of Promise plugins (breaks Vike discovery) #3152
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/plugin@0.4.268) 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';importvikefrom'vike/plugin';exportdefaultdefineConfig({plugins: [vike()]});
vike build fails as above. The identical config through vite's own defineConfig builds fine.
Activity