diff --git a/packages/vite/src/node/server/environments/rolldown.ts b/packages/vite/src/node/server/environments/rolldown.ts index 9205e4b4aef095..92edbdbba621b1 100644 --- a/packages/vite/src/node/server/environments/rolldown.ts +++ b/packages/vite/src/node/server/environments/rolldown.ts @@ -171,6 +171,10 @@ class RolldownEnvironment extends DevEnvironment { assert(this._pluginContainer) this._pluginContainer.buildStart = async () => {} this._pluginContainer.close = async () => {} + } + + // delay build till listen since some plugins expect `configureServer` before build + override listen: DevEnvironment['listen'] = async () => { await this.build() }