const require_rolldown_runtime = require('../../../../../../../../../../../_virtual/rolldown_runtime.cjs');
const require_getPackageJsonPath = require('./getPackageJsonPath.cjs');
const require_rolldown_runtime$1 = require('../_virtual/rolldown_runtime.cjs');
let node_module = require("node:module");

//#region ../@intlayer/cli/dist/esm/dictionaries-entry/dist/esm/config/dist/esm/utils/ESMxCJSHelpers.mjs
const isESModule = typeof require("url").pathToFileURL(__filename).href === "string";
/**
* Require relative to the user project
*
* Note: Can resolve package that are installed in the user project, ex `'intlayer'`
*/
const getProjectRequire = (startDir) => {
	const { packageJsonPath } = require_getPackageJsonPath.getPackageJsonPath(startDir);
	return (0, node_module.createRequire)(packageJsonPath);
};
/**
* Require relative to the @intlayer/config package
*
* Note: Can resolve package that are installed in the config package, ex `'@intlayer/types'`
*/
const configESMxCJSRequire = isESModule ? (0, node_module.createRequire)(require("url").pathToFileURL(__filename).href) : require_rolldown_runtime$1.__require$1;

//#endregion
exports.configESMxCJSRequire = configESMxCJSRequire;
exports.getProjectRequire = getProjectRequire;
//# sourceMappingURL=ESMxCJSHelpers.cjs.map