@@ -10,12 +10,13 @@ import 'recursive_statement.dart';
1010/// Returns two lists of dependencies for [stylesheet] .
1111///
1212/// The first is a list of URLs from all `@use` and `@forward` rules in
13- /// [stylesheet] . The second is a list of all imports in [stylesheet] .
13+ /// [stylesheet] (excluding built-in modules). The second is a list of all
14+ /// imports in [stylesheet] .
1415Tuple2 <List <Uri >, List <Uri >> findDependencies (Stylesheet stylesheet) =>
1516 _FindDependenciesVisitor ().run (stylesheet);
1617
1718/// A visitor that traverses a stylesheet and records, all `@import` , `@use` ,
18- /// and `@forward` rules it contains.
19+ /// and `@forward` rules (excluding built-in modules) it contains.
1920class _FindDependenciesVisitor extends RecursiveStatementVisitor {
2021 final _usesAndForwards = < Uri > [];
2122 final _imports = < Uri > [];
@@ -35,11 +36,11 @@ class _FindDependenciesVisitor extends RecursiveStatementVisitor {
3536 void visitSupportsCondition (SupportsCondition condition) {}
3637
3738 void visitUseRule (UseRule node) {
38- _usesAndForwards.add (node.url);
39+ if (node.url.scheme != 'sass' ) _usesAndForwards.add (node.url);
3940 }
4041
4142 void visitForwardRule (ForwardRule node) {
42- _usesAndForwards.add (node.url);
43+ if (node.url.scheme != 'sass' ) _usesAndForwards.add (node.url);
4344 }
4445
4546 void visitImportRule (ImportRule node) {
0 commit comments