Skip to content

Commit 3a66656

Browse files
wmertenssapphi-red
andcommitted
fix(vite): deadlock in rolldown-vite
Co-authored-by: sapphi-red <[email protected]>
1 parent daf0598 commit 3a66656

File tree

1 file changed

+2
-3
lines changed
  • packages/qwik/src/optimizer/src/plugins

1 file changed

+2
-3
lines changed

packages/qwik/src/optimizer/src/plugins/plugin.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -759,9 +759,8 @@ export function createQwikPlugin(optimizerOptions: OptimizerOptions = {}) {
759759
// unchanged imports are not missing in our internal transform cache
760760
// This can happen in the repl when the plugin is re-initialized
761761
// and possibly in other places
762-
for (const id of deps.values()) {
763-
await ctx.load({ id });
764-
}
762+
// NOTE: this should be Promise.all to avoid deadlocks
763+
await Promise.all([...deps.values()].map((id) => ctx.load({ id })));
765764

766765
ctx.addWatchFile(id);
767766

0 commit comments

Comments
 (0)