code: async function assurePath (modulePath, resolve) {
    if (resolveCache[modulePath] === false) {
      return false
    } else if (!(modulePath in resolveCache)) {
      if (typeof resolve === 'function') {
        try {
          resolveCache[modulePath] = !!(await resolve(modulePath))
        } catch (e) {
          resolveCache[modulePath] = false
        }
      }
    }
  
    return resolveCache[modulePath]
  }
docs: To test the target peer path exists or not.
  @param {string} modulePath Peer module path
  @param {function} resolve webpack module resolver
  @returns {Promise<boolean>} A promise resolved with true if the target peer path exists