@@ -497,48 +497,53 @@ impl EvaluateContext for WebpackLoaderContext {
497
497
directories,
498
498
build_file_paths,
499
499
} => {
500
- // Track dependencies of the loader task
501
- // TODO: Because these are reported _after_ the loader actually read the dependency
502
- // there is a race condition where we may miss updates that race
503
- // with the loader execution.
504
-
505
- // Track all the subscriptions in parallel, since certain loaders like tailwind
506
- // might add thousands of subscriptions.
507
- let env_subscriptions = env_variables
508
- . iter ( )
509
- . map ( |e| self . env . read ( e. clone ( ) ) )
510
- . try_join ( ) ;
511
- let file_subscriptions = file_paths
512
- . iter ( )
513
- . map ( |p| async move { self . cwd . join ( p) ?. read ( ) . await } )
514
- . try_join ( ) ;
515
- let directory_subscriptions = directories
516
- . iter ( )
517
- . map ( |( dir, glob) | async move {
518
- self . cwd
519
- . join ( dir) ?
520
- . track_glob ( Glob :: new ( glob. clone ( ) , GlobOptions :: default ( ) ) , false )
521
- . await
522
- } )
523
- . try_join ( ) ;
524
- let build_paths = build_file_paths
525
- . iter ( )
526
- . map ( |path| async move { self . cwd . join ( path) } )
527
- . try_join ( ) ;
528
- let ( resolved_build_paths, ..) = try_join ! (
529
- build_paths,
530
- env_subscriptions,
531
- file_subscriptions,
532
- directory_subscriptions
533
- ) ?;
534
-
535
- for build_path in resolved_build_paths {
536
- BuildDependencyIssue {
537
- source : IssueSource :: from_source_only ( self . context_source_for_issue ) ,
538
- path : build_path,
500
+ // We only process these dependencies to help with tracking, so if it is disabled
501
+ // dont bother.
502
+ if turbo_tasks:: turbo_tasks ( ) . is_tracking_dependencies ( ) {
503
+ // Track dependencies of the loader task
504
+ // TODO: Because these are reported _after_ the loader actually read the
505
+ // dependency there is a race condition where we may miss
506
+ // updates that race with the loader execution.
507
+
508
+ // Track all the subscriptions in parallel, since certain loaders like tailwind
509
+ // might add thousands of subscriptions.
510
+ let env_subscriptions = env_variables
511
+ . iter ( )
512
+ . map ( |e| self . env . read ( e. clone ( ) ) )
513
+ . try_join ( ) ;
514
+ let file_subscriptions = file_paths
515
+ . iter ( )
516
+ . map ( |p| async move { self . cwd . join ( p) ?. read ( ) . await } )
517
+ . try_join ( ) ;
518
+ let directory_subscriptions = directories
519
+ . iter ( )
520
+ . map ( |( dir, glob) | async move {
521
+ self . cwd
522
+ . join ( dir) ?
523
+ . track_glob ( Glob :: new ( glob. clone ( ) , GlobOptions :: default ( ) ) , false )
524
+ . await
525
+ } )
526
+ . try_join ( ) ;
527
+ let build_paths = build_file_paths
528
+ . iter ( )
529
+ . map ( |path| async move { self . cwd . join ( path) } )
530
+ . try_join ( ) ;
531
+ let ( resolved_build_paths, ..) = try_join ! (
532
+ build_paths,
533
+ env_subscriptions,
534
+ file_subscriptions,
535
+ directory_subscriptions
536
+ ) ?;
537
+
538
+ // These are 'build-dependency' messages from PostCss.
539
+ for build_path in resolved_build_paths {
540
+ BuildDependencyIssue {
541
+ source : IssueSource :: from_source_only ( self . context_source_for_issue ) ,
542
+ path : build_path,
543
+ }
544
+ . resolved_cell ( )
545
+ . emit ( ) ;
539
546
}
540
- . resolved_cell ( )
541
- . emit ( ) ;
542
547
}
543
548
}
544
549
InfoMessage :: EmittedError { error, severity } => {
0 commit comments