code: function getExternalModuleNameFromPath(host, fileName) {
          var getCanonicalFileName = function (f) { return host.getCanonicalFileName(f); };
          var dir = ts.toPath(host.getCommonSourceDirectory(), host.getCurrentDirectory(), getCanonicalFileName);
          var filePath = ts.getNormalizedAbsolutePath(fileName, host.getCurrentDirectory());
          var relativePath = ts.getRelativePathToDirectoryOrUrl(dir, filePath, dir, getCanonicalFileName, /*isAbsolutePathAnUrl*/ false);
          return ts.removeFileExtension(relativePath);
      }
docs: Resolves a local path to a path which is absolute to the base of the emit