Skip to content

Commit 4d46db9

Browse files
committed
cell synchronously
1 parent 42a7669 commit 4d46db9

File tree

1 file changed

+20
-15
lines changed

1 file changed

+20
-15
lines changed

crates/next-api/src/module_graph.rs

Lines changed: 20 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -580,22 +580,27 @@ async fn validate_pages_css_imports(
580580
.into_iter()
581581
.map(async |issue| {
582582
// We allow imports of global CSS files which are inside of `node_modules`.
583-
if !issue
584-
.module
585-
.ident()
586-
.path()
587-
.await?
588-
.path
589-
.contains("/node_modules/")
590-
{
591-
// TODO this is suboptimal because it's celling in a loop with a somewhat arbitrary
592-
// order
593-
issue.resolved_cell().emit();
594-
}
595-
Ok(())
583+
Ok(
584+
if !issue
585+
.module
586+
.ident()
587+
.path()
588+
.await?
589+
.path
590+
.contains("/node_modules/")
591+
{
592+
Some(issue)
593+
} else {
594+
None
595+
},
596+
)
596597
})
597-
.try_join()
598-
.await?;
598+
.try_flat_join()
599+
.await?
600+
.into_iter()
601+
.for_each(|issue| {
602+
issue.resolved_cell().emit();
603+
});
599604

600605
Ok(())
601606
}

0 commit comments

Comments
 (0)