{"id":24923132,"url":"https://github.com/leegeunhyeok/esresolve","last_synced_at":"2025-06-25T21:34:22.494Z","repository":{"id":274591352,"uuid":"870824390","full_name":"leegeunhyeok/esresolve","owner":"leegeunhyeok","description":"A powerful module resolver based on esbuild","archived":false,"fork":false,"pushed_at":"2025-01-28T08:13:25.000Z","size":234,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-28T08:28:38.062Z","etag":null,"topics":["esbuild","resolver"],"latest_commit_sha":null,"homepage":"https://npmjs.com/package/esresolve","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/leegeunhyeok.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-10-10T18:26:28.000Z","updated_at":"2025-01-28T08:13:29.000Z","dependencies_parsed_at":"2025-01-28T08:39:06.768Z","dependency_job_id":null,"html_url":"https://github.com/leegeunhyeok/esresolve","commit_stats":null,"previous_names":["leegeunhyeok/esresolve"],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leegeunhyeok%2Fesresolve","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leegeunhyeok%2Fesresolve/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leegeunhyeok%2Fesresolve/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leegeunhyeok%2Fesresolve/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/leegeunhyeok","download_url":"https://codeload.github.com/leegeunhyeok/esresolve/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246017723,"owners_count":20710240,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["esbuild","resolver"],"created_at":"2025-02-02T11:36:02.405Z","updated_at":"2025-03-28T11:17:12.956Z","avatar_url":"https://github.com/leegeunhyeok.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003cpicture\u003e\n    \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"./images/logo-dark.svg\"\u003e\n    \u003csource media=\"(prefers-color-scheme: light)\" srcset=\"./images/logo-light.svg\"\u003e\n    \u003cimg alt=\"esresolve: A powerful module resolver based on esbuild\" src=\"./images/logo-light.svg\"\u003e\n  \u003c/picture\u003e\n\u003c/p\u003e\n\n## Usage\n\n```ts\nimport { resolve, resolveFrom } from 'esresolve';\n\n// 1. Resolve module path from base path.\nawait resolve('/path/to/workspace', './my-module', {\n  /* options */\n});\n\n// 2. You can also resolve multiple modules.\nawait resolve('/path/to/workspace', ['./foo', './bar'], {\n  /* options */\n});\n\n// 3. You can create a resolver with the specified options applied.\nconst resolver = resolve.create({\n  /* options */\n});\nawait resolver('/path/to/workspace', './my-module');\n\n// 4. Resolve dependencies from specified module.\nawait resolveFrom('/path/to/module.ts', {\n  /* options */\n});\n```\n\n```ts\n// Resolve result\nconst result = await resolve('/path/to/workspace', './my-module');\n\n// \u003cresult\u003e\n// [\n//   {\n//     request: './my-module',\n//     path: '/path/to/workspace/src/core/my-module/index.ts',\n//   }\n// ]\n```\n\n\u003cdetails\u003e\n\n  \u003csummary\u003eOptions\u003c/summary\u003e\n\n```ts\ninterface ResolveOptions {\n  /**\n   * Specify the working directory path.\n   *\n   * Defaults to `current workspace path`.\n   *\n   * Documentation: https://esbuild.github.io/api/#working-directory\n   */\n  root?: string;\n  /**\n   * File extension of the modules to resolve.\n   *\n   * Defaults to `['.tsx', '.ts', '.jsx', '.js', '.css', '.json']`.\n   *\n   * Documentation: https://esbuild.github.io/api/#resolve-extensions\n   */\n  extensions?: BuildOptions['resolveExtensions'];\n  /**\n   * Controls how the exports field in package.json is interpreted.\n   *\n   * Documentation: https://esbuild.github.io/api/#conditions\n   */\n  conditionNames?: BuildOptions['conditions'];\n  /**\n   * Specify the field name to reference in package.json when importing the file.\n   *\n   * Documentation: https://esbuild.github.io/api/#main-fields\n   */\n  mainFields?: BuildOptions['mainFields'];\n  /**\n   * Configuration for aliasing a specified module to replace it with another module.\n   *\n   * Documentation: https://esbuild.github.io/api/#alias\n   */\n  alias?: BuildOptions['alias'];\n  /**\n   * Path to the `tsconfig.json` file to reference during resolution.\n   *\n   * Documentation: https://esbuild.github.io/api/#tsconfig\n   */\n  tsconfig?: BuildOptions['tsconfig'];\n  /**\n   * Stringified content of the `tsconfig.json` to reference during resolution.\n   *\n   * Documentation: https://esbuild.github.io/api/#tsconfig-raw\n   */\n  tsconfigRaw?: BuildOptions['tsconfigRaw'];\n}\n```\n\n\u003c/details\u003e\n\n## License\n\n[MIT](./LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleegeunhyeok%2Fesresolve","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fleegeunhyeok%2Fesresolve","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleegeunhyeok%2Fesresolve/lists"}