anchor.diff:                      .Replace("../", "..")
                       .Replace("./", ".")
                       .Replace("/", ".")
  -                    .Replace("...fable_modules.", "..") // attempted relative import beyond top-level package
                   + "."
               | false, "." -> ""
               | false, path ->
  
positive.code:             |> String.concat "/"
              // If empty path, then we're in the same dir
              |> (fun str -> if str.Length = 0 then "." else str)
          // printfn "mod, rel: %A" (modulePathname, relativePath)
          match modulePathname, relativePath with
          | "", _
  
negative.code:             modulePathname
                  .Replace(outDir, String.Empty) // Remove outDir from module path
                  .Replace(projDir, String.Empty) // Remove projectDir from module path
              |> (fun path ->
                  // Remove any common prefix between module path and project file
                  if commonPrefix.Length > 0 then
                      path.Replace(commonPrefix, String.Empty)
                  else
                      path)
              |> (fun path ->
                  // We cannot reference anything outside fable_modules from modules inside fable_modules
                  if Naming.isInFableModules com.CurrentFile then
                      path.Replace(Naming.fableModules, String.Empty)
                  else path)
              |> (fun path ->
                  // Cleanup path
                  path.Replace("//", "/"))
  
          //printfn "relativePath: %A" relativePath
  
          // Relative path from current file (up) to project dir
          let fileRelative =
              let commonPrefix =
                  // Avoid going out of fable_modules and back down again, i.e ../fable_modules/fable_library
                  if Naming.isInFableModules com.CurrentFile then
                      Path.getCommonBaseDir [ com.CurrentFile; IO.Path.GetFullPath(Path.Combine(Path.GetDirectoryName(com.CurrentFile), com.LibraryDir)) ]
                  else
                      Path.getCommonBaseDir [ com.CurrentFile; com.ProjectFile ]
  
              Path
                  .GetDirectoryName(com.CurrentFile.Replace(commonPrefix, String.Empty))
  