libsass: Resolve directory paths to directory index files

Closes #12851
This commit is contained in:
Joe Mooring
2024-09-15 15:10:37 -07:00
committed by Bjørn Erik Pedersen
parent 2bc27657d8
commit 5b442b3cce
4 changed files with 56 additions and 5 deletions

View File

@@ -105,7 +105,11 @@ func (t *toCSSTransformation) Transform(ctx *resources.ResourceTransformationCtx
} else if strings.HasPrefix(name, "_") {
namePatterns = []string{"_%s.scss", "_%s.sass"}
} else {
namePatterns = []string{"_%s.scss", "%s.scss", "_%s.sass", "%s.sass"}
namePatterns = []string{
"_%s.scss", "%s.scss",
"_%s.sass", "%s.sass",
"%s/_index.scss", "%s/_index.sass",
}
}
name = strings.TrimPrefix(name, "_")