{"id":21404757,"url":"https://github.com/fakundo/esbuild-plugin-replace-regex","last_synced_at":"2025-07-13T23:30:26.529Z","repository":{"id":57749020,"uuid":"524238846","full_name":"fakundo/esbuild-plugin-replace-regex","owner":"fakundo","description":"Simple esbuild plugin for replacing file content while bundling","archived":false,"fork":false,"pushed_at":"2022-08-12T22:41:17.000Z","size":74,"stargazers_count":2,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-24T05:52:22.760Z","etag":null,"topics":["esbuild","plugin","regex","replace"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fakundo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-08-12T22:21:37.000Z","updated_at":"2023-07-21T22:32:02.000Z","dependencies_parsed_at":"2022-08-27T00:20:21.370Z","dependency_job_id":null,"html_url":"https://github.com/fakundo/esbuild-plugin-replace-regex","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/fakundo/esbuild-plugin-replace-regex","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fakundo%2Fesbuild-plugin-replace-regex","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fakundo%2Fesbuild-plugin-replace-regex/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fakundo%2Fesbuild-plugin-replace-regex/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fakundo%2Fesbuild-plugin-replace-regex/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fakundo","download_url":"https://codeload.github.com/fakundo/esbuild-plugin-replace-regex/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fakundo%2Fesbuild-plugin-replace-regex/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265220050,"owners_count":23729750,"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","plugin","regex","replace"],"created_at":"2024-11-22T16:17:55.716Z","updated_at":"2025-07-13T23:30:25.730Z","avatar_url":"https://github.com/fakundo.png","language":"JavaScript","readme":"# esbuild-plugin-replace-regex\n\n[![npm](https://img.shields.io/npm/v/esbuild-plugin-replace-regex.svg)](https://www.npmjs.com/package/esbuild-plugin-replace-regex)\n\nSimple esbuild plugin for replacing file content while bundling.\n\n## Installation\n\n```console\nnpm i esbuild-plugin-replace-regex --save-dev\n```\n\n## Usage\n\n```js\nconst replacePlugin = require('esbuild-plugin-replace-regex');\n\n...\nplugins: [\n  replacePlugin({\n    filter: /myfile/,\n    patterns: [\n      ['VERSION', 'v7.7.7'],\n      [/myfunc\\((.+?)\\)/g, (m, arg) =\u003e `replaced(123, ${arg})`],\n    ]\n  })\n]\n...\n```\n\n## Options\n\n```js\n{\n  filter = /.*/,\n  loader = \"tsx\",\n  encoding = \"utf-8\",\n  patterns = []\n}\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffakundo%2Fesbuild-plugin-replace-regex","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffakundo%2Fesbuild-plugin-replace-regex","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffakundo%2Fesbuild-plugin-replace-regex/lists"}