Skip to content

Commit f10f600

Browse files
committed
avoid invalidating whole_app_module_graphs
1 parent f07262b commit f10f600

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

crates/next-api/src/project.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -738,6 +738,11 @@ impl Project {
738738
*self.mode
739739
}
740740

741+
#[turbo_tasks::function]
742+
pub(super) async fn is_watch_enabled(&self) -> Result<Vc<bool>> {
743+
Ok(Vc::cell(self.watch.enable))
744+
}
745+
741746
#[turbo_tasks::function]
742747
pub(super) async fn per_page_module_graph(&self) -> Result<Vc<bool>> {
743748
Ok(Vc::cell(*self.mode.await? == NextMode::Development))
@@ -944,7 +949,7 @@ impl Project {
944949

945950
// At this point all modules have been computed and we can get rid of the node.js
946951
// process pools
947-
if self.await?.watch.enable {
952+
if *self.is_watch_enabled().await? {
948953
turbopack_node::evaluate::scale_down();
949954
} else {
950955
turbopack_node::evaluate::scale_zero();

0 commit comments

Comments
 (0)