Fix dart sass import regression

Fixes #12072
This commit is contained in:
Bjørn Erik Pedersen
2024-02-20 14:46:03 +01:00
parent 48eec2a4e6
commit 621194a319
7 changed files with 14 additions and 13 deletions

View File

@@ -138,12 +138,13 @@ func (t importResolver) CanonicalizeURL(url string) (string, error) {
if url == sass.HugoVarsNamespace {
return url, nil
}
filePath, isURL := paths.UrlToFilename(url)
var prevDir string
var pathDir string
if isURL {
var found bool
prevDir, found = t.c.sfs.MakePathRelative(filepath.Dir(filePath))
prevDir, found = t.c.sfs.MakePathRelative(filepath.Dir(filePath), false)
if !found {
// Not a member of this filesystem, let Dart Sass handle it.