mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-28 22:19:59 +02:00
dartsass: Import CSS without extension at compile time
Applicable to Dart Sass only: - Sass imports with the .css extension indicate a plain CSS @import. - Sass imports without the .css extension are imported at compile time. Fixes #10592
This commit is contained in:
committed by
Bjørn Erik Pedersen
parent
271318ad78
commit
2662faf61f
@@ -163,9 +163,9 @@ func (t importResolver) CanonicalizeURL(url string) (string, error) {
|
||||
if strings.Contains(name, ".") {
|
||||
namePatterns = []string{"_%s", "%s"}
|
||||
} else if strings.HasPrefix(name, "_") {
|
||||
namePatterns = []string{"_%s.scss", "_%s.sass"}
|
||||
namePatterns = []string{"_%s.scss", "_%s.sass", "_%s.css"}
|
||||
} else {
|
||||
namePatterns = []string{"_%s.scss", "%s.scss", "_%s.sass", "%s.sass"}
|
||||
namePatterns = []string{"_%s.scss", "%s.scss", "_%s.sass", "%s.sass", "_%s.css", "%s.css"}
|
||||
}
|
||||
|
||||
name = strings.TrimPrefix(name, "_")
|
||||
|
Reference in New Issue
Block a user