CSS sourcemap not being generated?

What am I doing wrong here?

{{ $cssOpts := (dict "targetPath" "css/bradbice.css" "enableSourceMap" true "transpiler" "dartsass" ) }}
{{ $scss := resources.Get "scss/bradbice.scss" }}
{{ $styles := $scss | resources.ToCSS $cssOpts }}
<link rel="stylesheet" href="{{ $styles.RelPermalink }}" media="screen, print">

My /public/css folder only contains bradbice.css after a build.

When I copy and paste your code, everything works fine.

├── bradbice.css
└── bradbice.css.map

I’ve got something wrong locally then, I suppose. Running hugo or any version of that does not produce a bradbice.css or related file in /static/css and any changes I make to my local SCSS files are not being reproduced in the compiled CSS file that’s being created in the /public/css folder either.

If you could share your repo, even privately, it would be easier to track down the problem.

What happens when you type dart-sass-embedded --version ?


bradbice.github.io git:(update-color-tokens) dart-sass-embedded --version
zsh: command not found: dart-sass-embedded

Perhaps I haven’t set that up on my new(er) machine just yet? Thought I had though, or that it wasn’t necessary.

Make sure you install the latest version of dart-sass-embedded, 1.56.1.

1 Like

That was it, thanks @jmooring. I suspect perhaps versioning through macOS had messed up my previous installation (and stepping away from my project for a while in the meantime).

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.