"use strict";exports.__esModule=true;exports.__overrideCssConfiguration=__overrideCssConfiguration;var _plugins=require("./plugins");async function __overrideCssConfiguration(rootDirectory,isProduction,config){var _config$module,_config$module$rules;const postCssPlugins=await(0,_plugins.getPostCssPlugins)(rootDirectory,isProduction);function patch(rule){if(rule.options&&typeof rule.options==='object'&&typeof rule.options.postcssOptions==='object'){rule.options.postcssOptions.plugins=postCssPlugins;}else if(Array.isArray(rule.oneOf)){rule.oneOf.forEach(patch);}else if(Array.isArray(rule.use)){rule.use.forEach(u=>{if(typeof u==='object'){patch(u);}});}}(_config$module=config.module)==null?void 0:(_config$module$rules=_config$module.rules)==null?void 0:_config$module$rules.forEach(entry=>{patch(entry);});}
//# sourceMappingURL=overrideCssConfiguration.js.map