{"id":46859628,"url":"https://github.com/rstackjs/browserslist-load-config","last_synced_at":"2026-03-10T18:02:17.032Z","repository":{"id":257804381,"uuid":"864349828","full_name":"rstackjs/browserslist-load-config","owner":"rstackjs","description":"The `browserslist.loadConfig` method exported as a module.","archived":false,"fork":false,"pushed_at":"2026-03-02T04:59:25.000Z","size":166,"stargazers_count":3,"open_issues_count":2,"forks_count":1,"subscribers_count":4,"default_branch":"main","last_synced_at":"2026-03-02T06:40:07.572Z","etag":null,"topics":["browserslist"],"latest_commit_sha":null,"homepage":"","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/rstackjs.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-09-28T02:08:53.000Z","updated_at":"2026-03-02T04:58:40.000Z","dependencies_parsed_at":null,"dependency_job_id":"1053b57f-4daf-4353-ae34-5f568e255354","html_url":"https://github.com/rstackjs/browserslist-load-config","commit_stats":null,"previous_names":["rspack-contrib/browserslist-load-config","rstackjs/browserslist-load-config"],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/rstackjs/browserslist-load-config","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rstackjs%2Fbrowserslist-load-config","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rstackjs%2Fbrowserslist-load-config/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rstackjs%2Fbrowserslist-load-config/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rstackjs%2Fbrowserslist-load-config/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rstackjs","download_url":"https://codeload.github.com/rstackjs/browserslist-load-config/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rstackjs%2Fbrowserslist-load-config/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30346477,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-10T15:55:29.454Z","status":"ssl_error","status_checked_at":"2026-03-10T15:54:58.440Z","response_time":106,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["browserslist"],"created_at":"2026-03-10T18:02:10.894Z","updated_at":"2026-03-10T18:02:17.021Z","avatar_url":"https://github.com/rstackjs.png","language":"TypeScript","readme":"# browserslist-load-config\n\n\u003cp\u003e\n  \u003ca href=\"https://npmjs.com/package/browserslist-load-config\"\u003e\n   \u003cimg src=\"https://img.shields.io/npm/v/browserslist-load-config?style=flat-square\u0026colorA=564341\u0026colorB=EDED91\" alt=\"npm version\" /\u003e\n  \u003c/a\u003e\n  \u003cimg src=\"https://img.shields.io/badge/License-MIT-blue.svg?style=flat-square\u0026colorA=564341\u0026colorB=EDED91\" alt=\"license\" /\u003e\n  \u003ca href=\"https://npmcharts.com/compare/browserslist-load-config?minimal=true\"\u003e\u003cimg src=\"https://img.shields.io/npm/dm/browserslist-load-config.svg?style=flat-square\u0026colorA=564341\u0026colorB=EDED91\" alt=\"downloads\" /\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n## Introduction\n\nThis package is a fork of [browserslist.loadConfig](https://github.com/browserslist/browserslist) with some modifications to make it faster.\n\nCompare to `browserslist`, this package has the following improvements and differences:\n\n- **27 times** smaller bundle size\n- **140 times** smaller install size.\n- Zero dependencies.\n- Written in TypeScript.\n- Smaller and faster.\n- Does not support env variables.\n\n\u003e See [bundlephobia - browserslist-load-config](https://bundlephobia.com/package/browserslist-load-config) vs [bundlephobia - browserslist](https://bundlephobia.com/package/browserslist) for bundle size comparison.\n\n\u003e See [packagephobia - browserslist-load-config](https://packagephobia.com/result?p=browserslist-load-config) vs [packagephobia - browserslist](https://packagephobia.com/result?p=browserslist) for install size comparison.\n\n## Credits\n\nThanks [Andrey Sitnik](https://github.com/ai) for creating the [Browserslist](https://github.com/browserslist/browserslist) which is under [MIT License](https://github.com/browserslist/browserslist/blob/main/LICENSE).\n\n## Usage\n\nInstall:\n\n```bash\nnpm add browserslist-load-config -D\n```\n\n### loadConfig\n\nLoads the browserslist configuration from the specified file or directory, returns the browserslist config of specified environment.\n\n- **Type:**\n\n```ts\ntype LoadConfigOptions = {\n  /**\n   * Specify the path to the configuration file\n   * If both `config` and `path` are provided, `config` will be used\n   */\n  config?: string;\n  /**\n   * Specify the directory where the configuration file is located\n   */\n  path?: string;\n  /**\n   * Specify the environment to load\n   * @default \"production\"\n   */\n  env?: string;\n};\n\nfunction loadConfig(opts: LoadConfigOptions): string[] | undefined;\n```\n\n- **Example:**\n\n```ts\nimport { loadConfig } from \"browserslist-load-config\";\n\n// Pass a path to the configuration file\nconst config = loadConfig({\n  path: \"./path/to/project/root\",\n  env: \"production\",\n});\n\n// Pass a browserslist config directly\nconst config = loadConfig({\n  config: \"./path/to/project/root/.browserslistrc\",\n  env: \"production\",\n});\n\nconsole.log(config);\n/**\n * [\n *   // browserslist config\n * ]\n */\n```\n\n### findConfig\n\nFinds the browserslist configuration file in the specified directory, returns the resolved browserslist config object.\n\n- **Type:**\n\n```ts\nfunction findConfig(from: string): Record\u003cstring, string[]\u003e | undefined;\n```\n\n- **Example:**\n\n```ts\nimport { findConfig } from \"browserslist-load-config\";\n\nconst config = findConfig(\"./path/to/project/root\");\n\nconsole.log(config);\n/**\n * {\n *   defaults: [\n *     // default browserslist config\n *   ],\n *   development: [\n *     // development browserslist config\n *   ],\n *   production: [\n *     // production browserslist config\n *   ],\n * }\n */\n```\n\n## License\n\n[MIT](./LICENSE).\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frstackjs%2Fbrowserslist-load-config","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frstackjs%2Fbrowserslist-load-config","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frstackjs%2Fbrowserslist-load-config/lists"}