code: function assurePathSync (modulePath, resolveSync) {
    if (resolveCache[modulePath] === false) {
      return false
    } else if (!(modulePath in resolveCache)) {
      if (typeof resolveSync === 'function') {
        try {
          resolveCache[modulePath] = !!resolveSync(modulePath)
        } catch (e) {
          resolveCache[modulePath] = false
        }
      }
    }
  
    return resolveCache[modulePath]
  }
docs: To test the target peer path exists or not synchronously.
  @param {string} modulePath Peer module path
  @param {function} resolveSync webpack module resolver
  @returns {boolean} True if the target peer path exists