docs: async function getTargetEngines(asset, isTargetApp) {
    let targets = {};
    let path = isTargetApp
      ? Path.join(asset.options.rootDir, 'index')
      : asset.name;
    let compileTarget =
      asset.options.target === 'browser' ? 'browsers' : asset.options.target;
    let pkg = await asset.getConfig(['package.json'], {path});
    let engines = pkg && pkg.engines;
    let nodeVersion = engines && getMinSemver(engines.node);
  
    if (compileTarget === 'node') {
      // Use package.engines.node by default if we are compiling for node.
      if (typeof nodeVersion === 'string') {
        targets.node = nodeVersion;
      }
    } else {
      if (
        engines &&
        (typeof engines.browsers === 'string' || Array.isArray(engines.browsers))
      ) {
        targets.browsers = engines.browsers;
      } else if (pkg && pkg.browserslist) {
        targets.browsers = pkg.browserslist;
      } else {
        let browserslist = await loadBrowserslist(asset, path);
        if (browserslist) {
          targets.browsers = browserslist;
        } else {
          let babelTargets = await loadBabelrc(asset, path);
          if (babelTargets && babelTargets.browsers) {
            targets.browsers = babelTargets.browsers;
          } else if (babelTargets && babelTargets.node && !nodeVersion) {
            nodeVersion = babelTargets.node;
          }
        }
      }
  
      // Fall back to package.engines.node for node_modules without any browser target info.
      if (!isTargetApp && !targets.browsers && typeof nodeVersion === 'string') {
        targets.node = nodeVersion;
      }
    }
  
    // If we didn't find any targets, set some default engines for the target app.
    if (
      isTargetApp &&
      !targets[compileTarget] &&
      DEFAULT_ENGINES[compileTarget]
    ) {
      targets[compileTarget] = DEFAULT_ENGINES[compileTarget];
    }
  
    // Parse browser targets
    if (targets.browsers) {
      if (
        typeof targets.browsers === 'object' &&
        !Array.isArray(targets.browsers)
      ) {
        let env = asset.options.production
          ? 'production'
          : process.env.NODE_ENV || 'development';
        targets.browsers = targets.browsers[env] || targets.browsers.defaults;
      }
  
      if (targets.browsers) {
        targets.browsers = browserslist(targets.browsers).sort();
      }
    }
  
    // Dont compile if we couldn't find any targets
    if (Object.keys(targets).length === 0) {
      return null;
    }
  
    return targets;
  }