async function isJSX(
  options: PluginOptions,
  config: Config,
): Promise<boolean> {
  if (!config.isSource) {
    return false;
  }

  if (JSX_EXTENSIONS.has(path.extname(config.searchPath))) {
    return true;
  }

  let pkg = await config.getPackage();
  if (pkg?.alias && pkg.alias['react']) {
    // e.g.: `{ alias: { "react": "preact/compat" } }`
    return true;
  } else {
    // Find a dependency that implies JSX syntax.
    return JSX_LIBRARIES.some(
      libName =>
        pkg &&
        ((pkg.dependencies && pkg.dependencies[libName]) ||
          (pkg.devDependencies && pkg.devDependencies[libName]) ||
          (pkg.peerDependencies && pkg.peerDependencies[libName])),
    );
  }
}
Returns whether an asset is likely JSX. Attempts to detect react or react-like libraries
along with