Skip to content

Commit

Permalink
fix: await configResolved hooks of worker plugins (#15597) (#15605)
Browse files Browse the repository at this point in the history
Co-authored-by: Alec Larson <1925840+aleclarson@users.noreply.github.com>
  • Loading branch information
patak-dev and aleclarson authored Jan 18, 2024
1 parent b44c493 commit ef89f80
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions packages/vite/src/node/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -718,9 +718,11 @@ export async function resolveConfig(
)

// run configResolved hooks
createPluginHookUtils(resolvedWorkerPlugins)
.getSortedPluginHooks('configResolved')
.map((hook) => hook(workerResolved))
await Promise.all(
createPluginHookUtils(resolvedWorkerPlugins)
.getSortedPluginHooks('configResolved')
.map((hook) => hook(workerResolved)),
)

return resolvedWorkerPlugins
}
Expand Down

0 comments on commit ef89f80

Please sign in to comment.