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

@@ -29,7 +29,7 @@ import (
"github.com/gohugoio/hugo/resources"
"github.com/gohugoio/hugo/resources/internal"
"github.com/gohugoio/hugo/resources/resource_transformers/tocss/internal/sass"
"github.com/gohugoio/hugo/resources/resource_transformers/tocss/sass"
"github.com/spf13/afero"
@@ -85,7 +85,7 @@ func (t *transform) Transform(ctx *resources.ResourceTransformationCtx) error {
c: t.c,
dependencyManager: ctx.DependencyManager,
varsStylesheet: godartsass.Import{Content: sass.CreateVarsStyleSheet(opts.Vars)},
varsStylesheet: godartsass.Import{Content: sass.CreateVarsStyleSheet(sass.TranspilerDart, opts.Vars)},
},
OutputStyle: godartsass.ParseOutputStyle(opts.OutputStyle),
EnableSourceMap: opts.EnableSourceMap,