Repository: gohugoio/hugo (language: go)

Issue:
resources.ToCSS produces "stdin" in sourcemap sources if no "@include" is present in SCSS file
<!-- Please answer these questions before submitting your issue. Thanks! -->

### What version of Hugo are you using (`hugo version`)?

<pre>
$ hugo version
Hugo Static Site Generator v0.80.0/extended linux/amd64 BuildDate: unknown
</pre>

### Does this issue reproduce with the latest release?
yes

### Bug Description
When using Hugo pipe for SASS/SCSS with option `"enableSourceMap" true` in a theme's template the resulting sourcemap shows the following behavior:

- `style.scss` without `@import`
  ```scss
  body {
    margin: 0;
  }
  ```
  results in soucemap `style.css.map`
  ```json
  {
    "version": 3,
    "file": "style.css",
    "sourceRoot": "/www/my-hugo-page",
    "sources": [
      "stdin"
    ],
    "sourcesContent": [
      "<the content of style.scss>"
    ],
    "names": [],
    "mappings": "<the mappings>"
  }
  ```
- `style.scss` with `@import` pointing to an *empty* file
  ```scss
  body {
    margin: 0;
  }
  
  @import "dummy/empty"
  ```
  results in soucemap `style.css.map`
  ```json
  {
    "version": 3,
    "file": "style.css",
    "sourceRoot": "/www/my-hugo-page",
    "sources": [
      "themes/my-hugo-theme/assets/css/style.scss",
      "themes/my-hugo-theme/assets/css/dummy/_empty.scss"
    ],
    "sourcesContent": [
      "<the content of style.scss>",
      ""
    ],
    "names": [],
    "mappings": "<the mappings>"
  }
  ```

The resulting source map contains the expected value if the `sources` array contains more than one item, otherwise it simply contains `stdin`. This makes debugging CSS via browser tooling very hard, especially when using more than one SCSS style sheet on the same page.

The respective Hugo pipe was called like this in `themes/my-hugo-theme/layout/_default/baseof.html`:
```
{{ $style := resources.Get "css/style.scss" | resources.ToCSS (dict "enableSourceMap" true) }}
<link href="{{ $style.RelPermalink }}" rel="stylesheet" type="text/css"/>
```

I believe the issue is caused by this piece of code in the Hugo sources: [resources/resource_transformers/tocss/scss/tocss.go line 156](https://github.com/gohugoio/hugo/blob/v0.80.0/resources/resource_transformers/tocss/scss/tocss.go#L156)
To me it looks like it expects to find `stdin",`, but this is not the case for a SCSS file without an `@import`, because there is simply no `,` after the `"stdin"` in this case (there is only one item in the array and a trailing comma is not needed).



Discussion / hints:

Fix patch:
diff --git a/resources/resource_transformers/tocss/scss/tocss.go b/resources/resource_transformers/tocss/scss/tocss.go
index 57ac1671155..10bd1f6f8d8 100644
--- a/resources/resource_transformers/tocss/scss/tocss.go
+++ b/resources/resource_transformers/tocss/scss/tocss.go
@@ -163,7 +163,7 @@ func (t *toCSSTransformation) Transform(ctx *resources.ResourceTransformationCtx
 		// This is a workaround for what looks like a bug in Libsass. But
 		// getting this resolution correct in tools like Chrome Workspaces
 		// is important enough to go this extra mile.
-		mapContent := strings.Replace(res.SourceMapContent, `stdin",`, fmt.Sprintf("%s\",", sourcePath), 1)
+		mapContent := strings.Replace(res.SourceMapContent, `stdin"`, fmt.Sprintf("%s\"", sourcePath), 1)
 
 		return ctx.PublishSourceMap(mapContent)
 	}


Test patch: