packages/veui-loader/src/index.js
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]
}
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]
}
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 ] }
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
To test the target peer path exists or not .