Skip to content

Commit

Permalink
fix: move initial build from env.init to env.listen
Browse files Browse the repository at this point in the history
  • Loading branch information
hi-ogawa committed Dec 5, 2024
1 parent 3b8e8b8 commit 42ed65f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/vite/src/node/server/environments/rolldown.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}

Expand Down

0 comments on commit 42ed65f

Please sign in to comment.