dart-sass binary builds my sass files compile just fine, as does lib sass, however using Hugo and dart-sass-embedded I get the following error:
Error: Error building site: TOCSS-DART: failed to transform "sass/main.sass" (text/x-sass): "assets/sass/partials/_typography.sass:0:18": expected "{".
The problem seems to be that imported files get interpreted as being SCSS syntax rather than SASS (also known as INDENTED in the dart-sass-embedded source code).
Reproducable as follows:
Hugo stylesheet file:
{{ $options := dict
"transpiler" "dartsass"
"outputStyle" "compressed"
}}
<link rel="stylesheet" href="{{ (resources.Get "sass/main.sass" | resources.ToCSS $options).RelPermalink }}?v={{ $.Site.Params.revision }}">
sass/main.sass
:
@use "partials/typography"
main
display: grid
sass/partials/_ typography.sass
:
html
font-family: 'IM Fell English', serif
This happens on both Hugo latest version and Hugo git master.
dart-sass-embedded —version output
:
{
"protocolVersion": "1.2.0",
"compilerVersion": "1.58.3",
"implementationVersion": "1.58.3",
"implementationName": "Dart Sass",
"id": 0
}