# @netlify/edge-bundler

> Intelligently prepare Netlify Edge Functions for deployment

Latest version **16.0.4** (published 2026-08-21) · MIT license · 0 weekly downloads

## Install

```sh
npm install @netlify/edge-bundler
pnpm add @netlify/edge-bundler
yarn add @netlify/edge-bundler
bun add @netlify/edge-bundler
```

## Health

**Score 75/100 (B)** — status: active.

Positive: has types; esm support; no vulnerabilities; has provenance; recently updated; high maintenance score; high quality score.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 16.0.4 |
| Published | 2026-08-21 |
| First published | 2022-04-18 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | >=22.12.0 |
| Dependencies | 17 |
| Unpacked size | 3.6 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 258 |
| Author | Netlify Inc. |
| Maintainers | netlify-bot, mikewen, youvalv, serhalp-netlify, mlgualtieri-gatsby |

## Links

- npm: https://www.npmjs.com/package/@netlify/edge-bundler
- Repository: https://github.com/netlify/build
- Homepage: https://github.com/netlify/build#readme
- Issues: https://github.com/netlify/build/issues
- npm.io page: https://npm.io/package/@netlify/edge-bundler

## Dependencies (17)

- [ajv](https://npm.io/package/ajv.md) ^8.11.2
- [tar](https://npm.io/package/tar.md) ^7.5.12
- [acorn](https://npm.io/package/acorn.md) ^8.15.0
- [execa](https://npm.io/package/execa.md) ^8.0.0
- [semver](https://npm.io/package/semver.md) ^7.3.8
- [esbuild](https://npm.io/package/esbuild.md) 0.28.1
- [find-up](https://npm.io/package/find-up.md) ^7.0.0
- [p-retry](https://npm.io/package/p-retry.md) ^6.0.0
- [ajv-errors](https://npm.io/package/ajv-errors.md) ^3.0.0
- [tmp-promise](https://npm.io/package/tmp-promise.md) ^3.0.3
- [parse-imports](https://npm.io/package/parse-imports.md) ^2.2.1
- [node-stream-zip](https://npm.io/package/node-stream-zip.md) ^1.15.0
- [better-ajv-errors](https://npm.io/package/better-ajv-errors.md) ^1.2.0
- [common-path-prefix](https://npm.io/package/common-path-prefix.md) ^3.0.0
- [urlpattern-polyfill](https://npm.io/package/urlpattern-polyfill.md) 8.0.2
- [@import-maps/resolve](https://npm.io/package/@import-maps/resolve.md) ^2.0.0
- [@sveltejs/acorn-typescript](https://npm.io/package/@sveltejs/acorn-typescript.md) ^1.0.13

## Recent versions

- 16.0.4 (latest) — 2026-08-21
- 16.0.3 — 2026-08-13
- 16.0.2 — 2026-08-12
- 16.0.1 — 2026-08-03
- 16.0.0 — 2026-07-24
- 15.1.1 — 2026-07-20
- 15.1.0 — 2026-07-17
- 15.0.4 — 2026-07-13
- 15.0.3 — 2026-07-07
- 15.0.2 — 2026-07-02
- 15.0.1 — 2026-06-18
- 15.0.0 — 2026-06-16
- 14.10.3 — 2026-05-28
- 14.10.2 — 2026-05-12
- 14.10.1 — 2026-04-23
- … 199 more at https://npm.io/package/@netlify/edge-bundler/versions

## README

[![Build](https://github.com/netlify/edge-bundler/workflows/Build/badge.svg)](https://github.com/netlify/edge-bundler/actions)
[![Node](https://img.shields.io/node/v/@netlify/edge-bundler.svg?logo=node.js)](https://www.npmjs.com/package/@netlify/edge-bundler)

# Edge Bundler

Prepare Netlify Edge Functions for deployment

## Usage

1. Install this module as a dependency in your project

   ```
   npm install @netlify/edge-bundler --save
   ```

2. Import it and create a bundle from a directory of Edge Functions and a list of declarations.

   ```js
   import { bundle } from '@netlify/edge-bundler'

   // List of directories to search for Edge Functions.
   const sourceDirectories = ['/repo/netlify/edge-functions', '/repo/.netlify/edge-functions']

   // Directory where bundle should be placed.
   const distDirectory = '/repo/.netlify/edge-functions-dist'

   // List of Edge Functions declarations.
   const declarations = [
     { function: 'user-1', path: '/blog/*' },
     { function: 'internal-2', path: '/' },
   ]

   await bundle(sourceDirectories, distDirectory, declarations)
   ```

## Vendored modules

To avoid pulling in additional dependencies at runtime, this package vendors some Deno modules in the `deno/vendor`
directory.

This will go away soon as we move away from the ESZIP format.

> [!WARNING]  
> The `eszip` module contains a set of custom changes that diverge from the upstream. If you need to update this module,
> make sure to backport them.

## Contributors

Please see [CONTRIBUTING.md](/CONTRIBUTING.md) for instructions on how to set up and work on this repository. Thanks for
contributing!

---
_Source: https://npm.io/package/@netlify/edge-bundler · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
