Skip to content

Commit 42ed65f

Browse files
committed
fix: move initial build from env.init to env.listen
1 parent 3b8e8b8 commit 42ed65f

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

packages/vite/src/node/server/environments/rolldown.ts

+4
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,10 @@ class RolldownEnvironment extends DevEnvironment {
171171
assert(this._pluginContainer)
172172
this._pluginContainer.buildStart = async () => {}
173173
this._pluginContainer.close = async () => {}
174+
}
175+
176+
// delay build till listen since some plugins expect `configureServer` before build
177+
override listen: DevEnvironment['listen'] = async () => {
174178
await this.build()
175179
}
176180

0 commit comments

Comments
 (0)