function findWebpackRule(config, test) {
    for (const rule of getRules(config, test)) {
        return rule;
    }
}
Check that a matching webpack rule can be found

@param {import("webpack").Configuration} config
@param {(rule: import("webpack").RuleSetRule) => boolean} test
@returns {import('webpack').RuleSetRule | undefined}