import { configESMxCJSRequire } from "../utils/ESMxCJSHelpers.mjs";
import { loadExternalFileSync } from "../loadExternalFile/loadExternalFile.mjs";

//#region ../chokidar/dist/esm/config/dist/esm/configFile/loadConfigurationFile.mjs
const filterValidConfiguration = (configuration) => {
	return configuration;
};
/**
* Load the configuration file from the given path
* Example of configuration file: intlayer.config.js
*
* Accepts JSON, JS, MJS and TS files as configuration
*/
const loadConfigurationFile = (configFilePath, options) => {
	return filterValidConfiguration(loadExternalFileSync(configFilePath, {
		...options,
		aliases: {
			...options?.aliases,
			intlayer: configESMxCJSRequire.resolve("@intlayer/types")
		}
	}));
};

//#endregion
export { loadConfigurationFile };
//# sourceMappingURL=loadConfigurationFile.mjs.map