getProxyMiddleware = (proxyConfig) => {
        // It is possible to use the `bypass` method without a `target` or `router`.
        // However, the proxy middleware has no use in this case, and will fail to instantiate.
        if (proxyConfig.target) {
          const context = proxyConfig.context || proxyConfig.path;

          return createProxyMiddleware(
            /** @type {string} */ (context),
            proxyConfig,
          );
        }

        if (proxyConfig.router) {
          return createProxyMiddleware(proxyConfig);
        }

        // TODO improve me after drop `bypass` to always generate error when configuration is bad
        if (!proxyConfig.bypass) {
          util.deprecate(
            () => {},
            `Invalid proxy configuration:\n\n${JSON.stringify(proxyConfig, null, 2)}\n\nThe use of proxy object notation as proxy routes has been removed.\nPlease use the 'router' or 'context' options. Read more at https://github.com/chimurai/http-proxy-middleware/tree/v2.0.6#http-proxy-middleware-options`,
            "DEP_WEBPACK_DEV_SERVER_PROXY_ROUTES_ARGUMENT",
          )();
        }
      }
@param {ProxyConfigArrayItem} proxyConfig
@returns {RequestHandler | undefined}