const require_rolldown_runtime = require('../../../../../../../../../../_virtual/rolldown_runtime.cjs');
let node_fs = require("node:fs");
let dotenv = require("dotenv");
dotenv = require_rolldown_runtime.__toESM(dotenv);

//#region ../@intlayer/chokidar/dist/esm/core/dist/esm/config/dist/esm/loadEnvFile.mjs
const DEFAULT_ENV = "development";
const loadEnvFile = (options) => {
	const env = options?.env ?? DEFAULT_ENV;
	const envFiles = options?.envFile ? [options.envFile] : [
		`.env.${env}.local`,
		`.env.${env}`,
		".env.local",
		".env"
	];
	const result = {};
	dotenv.default.config({
		path: envFiles,
		processEnv: result
	});
	return result;
};

//#endregion
exports.loadEnvFile = loadEnvFile;
//# sourceMappingURL=loadEnvFile.cjs.map