|
1 |
| -> # **Important Notice** |
2 |
| -> |
3 |
| -> This repository was moved into the mono repository of [github.com/netlify/build](https://github.com/netlify/build) The |
4 |
| -> package name and the versions are preserved! |
5 |
| -
|
6 |
| - |
7 |
| -[](https://github.com/netlify/edge-bundler/actions) |
8 |
| -[](https://www.npmjs.com/package/@netlify/edge-bundler) |
9 |
| - |
10 | 1 | # Edge Bundler
|
11 | 2 |
|
12 |
| -Intelligently prepare Netlify Edge Functions for deployment. |
13 |
| - |
14 |
| -## Usage |
15 |
| - |
16 |
| -1. Install this module as a dependency in your project |
17 |
| - |
18 |
| - ``` |
19 |
| - npm install @netlify/edge-bundler --save |
20 |
| - ``` |
21 |
| - |
22 |
| -2. Import it and create a bundle from a directory of Edge Functions and a list of declarations. |
23 |
| - |
24 |
| - ```js |
25 |
| - import { bundle } from '@netlify/edge-bundler' |
26 |
| - |
27 |
| - // List of directories to search for Edge Functions. |
28 |
| - const sourceDirectories = ['/repo/netlify/edge-functions', '/repo/.netlify/edge-functions'] |
29 |
| - |
30 |
| - // Directory where bundle should be placed. |
31 |
| - const distDirectory = '/repo/.netlify/edge-functions-dist' |
32 |
| - |
33 |
| - // List of Edge Functions declarations. |
34 |
| - const declarations = [ |
35 |
| - { function: 'user-1', path: '/blog/*' }, |
36 |
| - { function: 'internal-2', path: '/' }, |
37 |
| - ] |
38 |
| - |
39 |
| - await bundle(sourceDirectories, distDirectory, declarations) |
40 |
| - ``` |
41 |
| - |
42 |
| -## Vendored modules |
43 |
| - |
44 |
| -To avoid pulling in additional dependencies at runtime, this package vendors some Deno modules in the `deno/vendor` |
45 |
| -directory. |
46 |
| - |
47 |
| -You can recreate this directory by running `npm run vendor`. |
48 |
| - |
49 |
| -> [!WARNING] |
50 |
| -> At the time of writing, the underlying Deno CLI command doesn't correctly pull the WASM binary required by the ESZIP |
51 |
| -> module. If you run the command to update the list of vendores modules, please ensure you're not deleting |
52 |
| -> `eszip_wasm_bg.wasm`. |
53 |
| -
|
54 |
| -## Contributors |
55 |
| - |
56 |
| -Please see [CONTRIBUTING.md](./CONTRIBUTING.md) for instructions on how to set up and work on this repository. Thanks |
57 |
| -for contributing! |
| 3 | +> [!IMPORTANT] |
| 4 | +> This project was moved into the [Netlify Build monorepo](https://github.com/netlify/build/tree/main/packages/edge-bundler). |
0 commit comments