Skip to content

Commit

Permalink
fix: buildStart guard
Browse files Browse the repository at this point in the history
  • Loading branch information
patak-dev committed Aug 26, 2024
1 parent 030ed81 commit 1f77e94
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/vite/src/node/server/pluginContainer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -274,14 +274,18 @@ class EnvironmentPluginContainer {
}

async buildStart(_options?: InputOptions): Promise<void> {
if (this._started) {
await this._started
return
}
this._started = this.handleHookPromise(
this.hookParallel(
'buildStart',
(plugin) => this._getPluginContext(plugin),
() => [this.options as NormalizedInputOptions],
(plugin) =>
this.environment.name === 'client' ||
plugin.perEnvironmentStartEndDuringDev !== true,
plugin.perEnvironmentStartEndDuringDev === true,
),
) as Promise<void>
await this._started
Expand Down

0 comments on commit 1f77e94

Please sign in to comment.