mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-27 22:09:53 +02:00
@@ -218,7 +218,7 @@ func createBuildPlugins(depsManager identity.Manager, c *Client, opts Options) (
|
||||
isStdin := args.Importer == stdinImporter
|
||||
var relDir string
|
||||
if !isStdin {
|
||||
rel, found := fs.MakePathRelative(args.Importer)
|
||||
rel, found := fs.MakePathRelative(args.Importer, true)
|
||||
if !found {
|
||||
// Not in any of the /assets folders.
|
||||
// This is an import from a node_modules, let
|
||||
|
@@ -138,12 +138,13 @@ func (t importResolver) CanonicalizeURL(url string) (string, error) {
|
||||
if url == sass.HugoVarsNamespace {
|
||||
return url, nil
|
||||
}
|
||||
|
||||
filePath, isURL := paths.UrlToFilename(url)
|
||||
var prevDir string
|
||||
var pathDir string
|
||||
if isURL {
|
||||
var found bool
|
||||
prevDir, found = t.c.sfs.MakePathRelative(filepath.Dir(filePath))
|
||||
prevDir, found = t.c.sfs.MakePathRelative(filepath.Dir(filePath), false)
|
||||
|
||||
if !found {
|
||||
// Not a member of this filesystem, let Dart Sass handle it.
|
||||
|
@@ -86,7 +86,7 @@ func (t *toCSSTransformation) Transform(ctx *resources.ResourceTransformationCtx
|
||||
if prev == "stdin" {
|
||||
prevDir = baseDir
|
||||
} else {
|
||||
prevDir, _ = t.c.sfs.MakePathRelative(filepath.Dir(prev))
|
||||
prevDir, _ = t.c.sfs.MakePathRelative(filepath.Dir(prev), false)
|
||||
|
||||
if prevDir == "" {
|
||||
// Not a member of this filesystem. Let LibSASS handle it.
|
||||
|
Reference in New Issue
Block a user