code: function resolveModuleDirectoryFrom(src: string, name: string): string {
    return resolveFrom(src, name).replace(
      /node_modules\/([^/]+).*$/,
      'node_modules/$1'
    );
  }
docs: We need the directory for the module instead of the filename to its main file.