{"id":20196657,"url":"https://github.com/polyipseity/esbuild-compress","last_synced_at":"2025-03-03T08:14:53.585Z","repository":{"id":165197961,"uuid":"640552970","full_name":"polyipseity/esbuild-compress","owner":"polyipseity","description":"Plugin for esbuild that compresses embedded data, which will be decompressed at runtime, to reduce bundle size.","archived":false,"fork":false,"pushed_at":"2025-02-11T12:48:24.000Z","size":384,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-14T07:50:54.597Z","etag":null,"topics":["compress","compression","esbuild","esbuild-plugin","plugin"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/polyipseity.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE.txt","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},"funding":{"community_bridge":null,"github":["polyipseity"],"issuehunt":null,"ko_fi":null,"liberapay":null,"open_collective":null,"otechie":null,"patreon":null,"tidelife":null,"custom":["https://buymeacoffee.com/polyipseity"]}},"created_at":"2023-05-14T13:29:17.000Z","updated_at":"2024-07-26T22:07:03.000Z","dependencies_parsed_at":null,"dependency_job_id":"9c6f074b-e210-453c-8bba-78948e91f631","html_url":"https://github.com/polyipseity/esbuild-compress","commit_stats":null,"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/polyipseity%2Fesbuild-compress","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/polyipseity%2Fesbuild-compress/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/polyipseity%2Fesbuild-compress/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/polyipseity%2Fesbuild-compress/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/polyipseity","download_url":"https://codeload.github.com/polyipseity/esbuild-compress/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241629769,"owners_count":19993710,"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":["compress","compression","esbuild","esbuild-plugin","plugin"],"created_at":"2024-11-14T04:25:15.606Z","updated_at":"2025-03-03T08:14:53.576Z","avatar_url":"https://github.com/polyipseity.png","language":"JavaScript","funding_links":["https://github.com/sponsors/polyipseity","https://buymeacoffee.com/polyipseity"],"categories":[],"sub_categories":[],"readme":"# esbuild-compress\n\n[esbuild]: https://esbuild.github.io\n\nPlugin for [esbuild] that compresses embedded data, which will be decompressed at runtime, to reduce bundle size.\n\n## Usage\n\n- Configuration:\n```JavaScript\nimport { build } from \"esbuild\"\nimport esbuildCompress from \"esbuild-compress\"\nimport myBuildOptions from \"./my-build-options.mjs\"\n\nawait build({\n\t...myBuildOptions,\n\tplugins: [\n\t\tesbuildCompress({\n\t\t\t// see plugin options\n\t\t\tcompressors: [\n\t\t\t\t{\n\t\t\t\t\tfilter: /\\.json$/u,\n\t\t\t\t\tloader: \"json\",\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tfilter: /\\.txt$/u,\n\t\t\t\t\tlazy: true,\n\t\t\t\t\tloader: \"text\",\n\t\t\t\t},\n\t\t\t],\n\t\t}),\n\t],\n})\n```\n- Usage:\n```JavaScript\nimport json from \"./example.json\"\nimport text0 from \"./example.txt\"\n\nconst text = await text0 // unnecessary if `lazy` is `false`\n\nconsumeJSON(json.key)\nconsumeText(text)\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpolyipseity%2Fesbuild-compress","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpolyipseity%2Fesbuild-compress","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpolyipseity%2Fesbuild-compress/lists"}