{"id":14155923,"url":"https://github.com/beeequeue/esbuild-cf-functions-plugin","last_synced_at":"2025-04-13T12:11:46.246Z","repository":{"id":36988449,"uuid":"505174056","full_name":"beeequeue/esbuild-cf-functions-plugin","owner":"beeequeue","description":"🔧 A plugin to configure ESBuild for building code compatible with CloudFront Functions","archived":false,"fork":false,"pushed_at":"2025-04-11T18:56:53.000Z","size":909,"stargazers_count":17,"open_issues_count":4,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-13T12:11:41.803Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","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/beeequeue.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":null,"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":{"ko_fi":"beequeue"}},"created_at":"2022-06-19T17:19:59.000Z","updated_at":"2025-04-01T02:09:55.000Z","dependencies_parsed_at":"2022-07-13T01:50:35.907Z","dependency_job_id":"1e1b7c57-d2ff-41b3-8be7-7a5fe1552a10","html_url":"https://github.com/beeequeue/esbuild-cf-functions-plugin","commit_stats":{"total_commits":231,"total_committers":5,"mean_commits":46.2,"dds":0.2770562770562771,"last_synced_commit":"a48ac6906fe5ad35b0bb86a84b0919e71702c8d8"},"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beeequeue%2Fesbuild-cf-functions-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beeequeue%2Fesbuild-cf-functions-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beeequeue%2Fesbuild-cf-functions-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beeequeue%2Fesbuild-cf-functions-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/beeequeue","download_url":"https://codeload.github.com/beeequeue/esbuild-cf-functions-plugin/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248710450,"owners_count":21149191,"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":[],"created_at":"2024-08-17T08:05:05.768Z","updated_at":"2025-04-13T12:11:46.216Z","avatar_url":"https://github.com/beeequeue.png","language":"TypeScript","readme":"# `esbuild-cf-functions-plugin`\n\n[![npm](https://img.shields.io/npm/v/esbuild-cf-functions-plugin)](https://www.npmjs.com/package/esbuild-cf-functions-plugin)\n![node-current](https://img.shields.io/node/v/esbuild-cf-functions-plugin)\n![esbuild-current](https://img.shields.io/badge/esbuild-\u003e=0.14.46-green)\n[![Codecov](https://img.shields.io/codecov/c/github/BeeeQueue/esbuild-cf-functions-plugin?token=S8W0PQDUQ1)](https://app.codecov.io/github/BeeeQueue/esbuild-cf-functions-plugin)\n\nThis plugin configures ESBuild for building code [compatible][runtime] with [CloudFront Functions][cf-functions].\n\nAs can be seen in the documentation, CloudFront Functions do not run on Node, but on AWS's custom JS runtime.\n\nAccording to them, it\n\n\u003e ... is compliant with ECMAScript (ES) version 5.1 and also supports some features of ES versions 6 through 9.\n\nThis plugin does its best to enable and disable transpiling features as the documentation says is available for the [v1 runtime][runtime] and [v2 runtime][runtime-v2]. By default the v1 runtime is assumed.\n\n**Check out the [example](./example)!**\n\n## Usage\n\n\u003cdetails\u003e\n  \u003csummary\u003eInstallation\u003c/summary\u003e\n\n```shell\nnpm i -D esbuild-cf-functions-plugin\n```\n\n```shell\npnpm i -D esbuild-cf-functions-plugin\n```\n\n```shell\nyarn add -D esbuild-cf-functions-plugin\n```\n\n\u003c/details\u003e\n\n```js\n// build.mjs\nimport { build } from \"esbuild\"\nimport { CloudFrontFunctionsPlugin } from \"esbuild-cf-functions-plugin\"\n\nvoid build({\n  entryPoints: [\"src/index.ts\"],\n  outdir: \"dist\",\n\n  minify: true,\n  logLevel: \"info\",\n\n  plugins: [CloudFrontFunctionsPlugin()],\n})\n```\n\nTo enable v2 runtime features:\n\n```js\n  plugins: [CloudFrontFunctionsPlugin({ runtimeVersion: 2 })],\n```\n\n_The plugin overrides the `format` and `target` options, unless I did something wrong._\n\n[cf-functions]: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/functions-javascript-runtime-features.html\n[runtime]: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/functions-javascript-runtime-features.html\n[runtime-v2]: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/functions-javascript-runtime-20.html\n","funding_links":["https://ko-fi.com/beequeue"],"categories":["others"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbeeequeue%2Fesbuild-cf-functions-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbeeequeue%2Fesbuild-cf-functions-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbeeequeue%2Fesbuild-cf-functions-plugin/lists"}