hello I changed all my css files to scss and now my live reload no longer works.
I have a partial called css.html
{{- /* Styles */}}
{{ $theme_vars :=slice (resources.Get "/scss/core/theme-vars.scss") }}
{{ $reset :=slice (resources.Get "/scss/core/reset.scss") }}
{{ $common := (resources.Match "/scss/common/*.scss") }}
{{- /* markup.highlight.noClasses should be set to `false` */}}
{{ $code_styles :=slice (resources.Get "/scss/includes/syntax-light.scss") }}
{{ $extended := (resources.Match "/scss/extended/*.scss") }}
{{- /* order is important */}}
{{ $styles := (slice $theme_vars $reset $common $code_styles $extended) }}
{{- /* bundle all required css */}}
{{- /* Add extended css after theme style */ -}}
{{- /* scss compile optionss */}}
{{ if eq hugo.Environment "development" }}
{{ $stylesheets := slice }}
{{ range $styles }}
{{ $stylesheets = $stylesheets | collections.Append . }}
{{ end }}
{{ range $stylesheets }}
{{ $opts := dict "transpiler" "dartsass" }}
{{ $scsss := . | fingerprint | resources.ToCSS $opts }}
<link
crossorigin="anonymous"
href="{{ $scsss.RelPermalink }}"
rel="preload stylesheet"
as="style"
/>
{{ end }}
{{ else }}
{{ $stylesheets := slice }}
{{ range $sty := $styles }}
{{ $stylesheets = $stylesheets | collections.Append $sty }}
{{ end }}
{{ $opts := dict "transpiler" "dartsass" }}
{{ $stylesheet := $stylesheets | resources.Concat "assets/scss/stylesheet.scss"| resources.ToCSS $opts | resources.Minify | fingerprint }}
<link
crossorigin="anonymous"
href="{{ $stylesheet.RelPermalink }}"
integrity="{{ $stylesheet.Data.Integrity }}"
rel="preload stylesheet"
as="style"
/>
{{ end }}
and the folter /scss/common/ contans 6 more scss files. If I change one of those files the server notices it and reloads, but the file stays the same. even when fingerprinting. Only a restart of hugo will refresh those files.
The command hugo serve --noHTTPCache --ignoreCache --disableFastRender -v --cleanDestinationDir --renderToMemory
does not help
it seems the toCSS function does not like it to be called in a slice.
related topics
thank you