URI: 
       js: Fix potential path issue on Windows - hugo - [fork] hugo port for 9front
  HTML git clone git@git.drkhsh.at/hugo.git
   DIR Log
   DIR Files
   DIR Refs
   DIR Submodules
   DIR README
   DIR LICENSE
       ---
   DIR commit b60e9279ab95030828eb4f822be96250284c4d8d
   DIR parent a9b0fea6a3aec658912a8db134824dee4a9b6369
  HTML Author: Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
       Date:   Mon,  1 Feb 2021 12:49:08 +0100
       
       js: Fix potential path issue on Windows
       
       Diffstat:
         M resources/resource_transformers/js… |       4 ++--
         M resources/resource_transformers/js… |       4 ++--
       
       2 files changed, 4 insertions(+), 4 deletions(-)
       ---
   DIR diff --git a/resources/resource_transformers/js/build.go b/resources/resource_transformers/js/build.go
       @@ -81,8 +81,8 @@ func (t *buildTransformation) Transform(ctx *resources.ResourceTransformationCtx
                        return err
                }
        
       -        opts.sourcefile = ctx.SourcePath
       -        opts.resolveDir = t.c.rs.WorkingDir
       +        opts.sourceDir = filepath.FromSlash(path.Dir(ctx.SourcePath))
       +        opts.resolveDir = t.c.rs.WorkingDir // where node_modules gets resolved
                opts.contents = string(src)
                opts.mediaType = ctx.InMediaType
        
   DIR diff --git a/resources/resource_transformers/js/options.go b/resources/resource_transformers/js/options.go
       @@ -102,7 +102,7 @@ type Options struct {
                mediaType  media.Type
                outDir     string
                contents   string
       -        sourcefile string
       +        sourceDir  string
                resolveDir string
                tsConfig   string
        }
       @@ -201,7 +201,7 @@ func createBuildPlugins(c *Client, opts Options) ([]api.Plugin, error) {
                                }
                                relDir = filepath.Dir(rel)
                        } else {
       -                        relDir = filepath.Dir(opts.sourcefile)
       +                        relDir = opts.sourceDir
                        }
        
                        // Imports not starting with a "." is assumed to live relative to /assets.