resources: Address Dart Sass deprecation of global built-in functions

See https://github.com/sass/dart-sass/releases/tag/1.80.0

Fixes #12961
This commit is contained in:
Joe Mooring
2024-10-18 16:10:46 -07:00
committed by Bjørn Erik Pedersen
parent 72352f205a
commit 889308dd85
6 changed files with 71 additions and 19 deletions

View File

@@ -31,7 +31,7 @@ import (
"github.com/gohugoio/hugo/identity"
"github.com/gohugoio/hugo/media"
"github.com/gohugoio/hugo/resources"
"github.com/gohugoio/hugo/resources/resource_transformers/tocss/internal/sass"
"github.com/gohugoio/hugo/resources/resource_transformers/tocss/sass"
)
// Used in tests. This feature requires Hugo to be built with the extended tag.
@@ -64,7 +64,7 @@ func (t *toCSSTransformation) Transform(ctx *resources.ResourceTransformationCtx
}
}
varsStylesheet := sass.CreateVarsStyleSheet(options.from.Vars)
varsStylesheet := sass.CreateVarsStyleSheet(sass.TranspilerLibSass, options.from.Vars)
// To allow for overrides of SCSS files anywhere in the project/theme hierarchy, we need
// to help libsass revolve the filename by looking in the composite filesystem first.