Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 20s
Build & Deploy / 🧪 QA (push) Failing after 34s
Build & Deploy / 🏗️ Build (push) Has started running
Build & Deploy / 🚀 Deploy (push) Has been cancelled
Build & Deploy / 🧪 Smoke Test (push) Has been cancelled
Build & Deploy / ⚡ Lighthouse (push) Has been cancelled
Build & Deploy / 🔔 Notify (push) Has been cancelled
17 lines
583 B
Plaintext
17 lines
583 B
Plaintext
import { sanitizeConfig } from './sanitize.js';
|
|
/**
|
|
* @description Builds and validates Payload configuration
|
|
* @param config Payload Config
|
|
* @returns Built and sanitized Payload Config
|
|
*/ export async function buildConfig(config) {
|
|
if (Array.isArray(config.plugins)) {
|
|
let configAfterPlugins = config;
|
|
for (const plugin of config.plugins){
|
|
configAfterPlugins = await plugin(configAfterPlugins);
|
|
}
|
|
return await sanitizeConfig(configAfterPlugins);
|
|
}
|
|
return await sanitizeConfig(config);
|
|
}
|
|
|
|
//# sourceMappingURL=build.js.map |