mirror of
https://github.com/gohugoio/hugo.git
synced 2024-12-27 21:41:01 +00:00
resource/scss: Fix source maps on Windows
I have tested this OK on * Windows 10 (it did not work before this commit) * MacOS Fixes #4968
This commit is contained in:
parent
8278384b96
commit
f01505c910
1 changed files with 5 additions and 0 deletions
|
@ -19,6 +19,7 @@ import (
|
|||
"fmt"
|
||||
"io"
|
||||
"path"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
|
||||
"github.com/bep/go-tocss/scss"
|
||||
|
@ -84,6 +85,10 @@ func (t *toCSSTransformation) Transform(ctx *resource.ResourceTransformationCtx)
|
|||
sourcePath = strings.TrimPrefix(sourcePath, t.c.rs.WorkingDir+helpers.FilePathSeparator)
|
||||
}
|
||||
|
||||
// This needs to be Unix-style slashes, even on Windows.
|
||||
// See https://github.com/gohugoio/hugo/issues/4968
|
||||
sourcePath = filepath.ToSlash(sourcePath)
|
||||
|
||||
// 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.
|
||||
|
|
Loading…
Reference in a new issue