{"id":32551239,"url":"https://github.com/aziontech/bundler","last_synced_at":"2026-03-06T20:07:19.596Z","repository":{"id":177386608,"uuid":"645067841","full_name":"aziontech/bundler","owner":"aziontech","description":"Bundler to make applications compatible with the Azion Runtime.","archived":false,"fork":false,"pushed_at":"2026-03-03T04:22:20.000Z","size":22279,"stargazers_count":21,"open_issues_count":4,"forks_count":10,"subscribers_count":12,"default_branch":"main","last_synced_at":"2026-03-03T08:34:41.695Z","etag":null,"topics":["bundler","edge","edge-computing","esbuild","javascript","lambda-functions","polyfills","presets","react","serverless","typescript","webpack","workers"],"latest_commit_sha":null,"homepage":"https://www.azion.com","language":"TypeScript","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/aziontech.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2023-05-24T21:15:57.000Z","updated_at":"2026-03-03T04:22:23.000Z","dependencies_parsed_at":"2025-12-16T10:03:32.021Z","dependency_job_id":null,"html_url":"https://github.com/aziontech/bundler","commit_stats":null,"previous_names":["aziontech/vulcan","aziontech/bundler"],"tags_count":236,"template":false,"template_full_name":null,"purl":"pkg:github/aziontech/bundler","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aziontech%2Fbundler","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aziontech%2Fbundler/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aziontech%2Fbundler/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aziontech%2Fbundler/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aziontech","download_url":"https://codeload.github.com/aziontech/bundler/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aziontech%2Fbundler/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30053982,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-03T17:46:22.538Z","status":"ssl_error","status_checked_at":"2026-03-03T17:46:22.036Z","response_time":61,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["bundler","edge","edge-computing","esbuild","javascript","lambda-functions","polyfills","presets","react","serverless","typescript","webpack","workers"],"created_at":"2025-10-28T20:59:11.125Z","updated_at":"2026-03-03T19:06:51.095Z","avatar_url":"https://github.com/aziontech.png","language":"TypeScript","readme":"\u003cp align=\"center\"\u003e\n  \u003cimg src=\"assets/logo.png\" alt=\"Azion Bundler Logo\" width=\"200\"/\u003e\n\u003c/p\u003e\n\n# Azion Bundler - Built for Builders of the Edge\n\n[![Version](https://img.shields.io/npm/v/edge-functions.svg)](https://www.npmjs.com/package/edge-functions)\n[![License](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE.md)\n[![Downloads](https://img.shields.io/npm/dm/edge-functions.svg)](https://www.npmjs.com/package/edge-functions)\n[![GitHub Stars](https://img.shields.io/github/stars/aziontech/bundler.svg)](https://github.com/aziontech/bundler/stargazers)\n[![Maintainers](https://img.shields.io/badge/maintainers-jotanarciso,%20jcbsfilho-blue.svg)](https://github.com/aziontech/bundler/graphs/contributors)\n\nAzion Bundler is a powerful tool designed to build and adapt projects for edge computing. It handles module resolution and applies necessary polyfills through [unjs/unenv](https://github.com/unjs/unenv) while providing an abstraction layer over popular bundlers like esbuild and webpack. The tool includes a local development environment for testing and debugging, and processes Infrastructure as Code (IaC) through its manifest system.\n\n## Table of Contents\n\n- [Azion Bundler - Built for Builders of the Edge](#azion-bundler---built-for-builders-of-the-edge)\n  - [Table of Contents](#table-of-contents)\n  - [Quick Installation](#quick-installation)\n  - [Getting Started for Development](#getting-started-for-development)\n  - [Using](#using)\n  - [Commands](#commands)\n    - [`build`](#build)\n    - [`dev`](#dev)\n    - [`config`](#config)\n    - [`presets`](#presets)\n    - [`store`](#store)\n    - [`manifest`](#manifest)\n  - [Configuration](#configuration)\n  - [Build Process Flow](#build-process-flow)\n  - [Documentation](#documentation)\n  - [Supported Features](#supported-features)\n  - [Contributing](#contributing)\n  - [License](#license)\n\n## Quick Installation\n\nFor those who just want to use Azion Bundler in their project without contributing to the development, you can install it directly from npm.\n\n```shell\nnpm install edge-functions\n```\n\nor if you prefer yarn:\n\n```shell\nyarn add edge-functions\n```\n\n## Getting Started for Development\n\nFollow these steps to start using Azion Bundler:\n\n1. Clone the repository: Clone the Azion Bundler repository from GitHub to your local machine.\n\n   ```shell\n   git clone https://github.com/aziontech/bundler.git\n   ```\n\n2. Installation: Navigate to the cloned Azion Bundler directory and install the required dependencies.\n\n   ```shell\n   cd bundler\n   npm yarn install\n   ```\n\n3. Install the Azion Bundler CLI globally, which allows you to use it as a command-line tool from anywhere in your system.\n\n   ```shell\n   npm install -g\n   ```\n\n   This command sets up the necessary project structure and configuration files for Azion Bundler.\n\n4. Start developing: Once the project is set up, you can start developing your JavaScript applications or frameworks using the power of Bundler.\n\n## Using\n\nSee some examples below:\n\n- Build a JavaScript/Node project (back-end)\n\n  ```shell\n  ef build\n  ```\n\n- Build a TypeScript/Node (back-end)\n\n  ```shell\n  ef build --preset typescript\n  ```\n\n- Build a Next.js project\n\n  ```shell\n  ef build --preset next\n  ```\n\n- Build Astro.js project\n\n  ```shell\n  ef build --preset astro\n  ```\n\n- Test your project locally (after build)\n\n  ```shell\n  ef dev\n  ```\n\n## Commands\n\nThe Azion Bundler CLI provides several commands to help you manage your edge applications:\n\n\u003e ⚠️ \\*Deprecation Notice:\n\u003e Support for the webpack bundler will be discontinued in future releases. While it is still available for now, new features, fixes, and improvements will be focused exclusively on esbuild. We recommend migrating to esbuild as soon as possible to ensure compatibility and better performance in upcoming versions.\n\n### `build`\nBuilds your project for edge deployment.\n\n```shell\nef build [options]\n\nOptions:\n  -e, --entry \u003cstring\u003e     Code entrypoint (default: ./handler.js or ./handler.ts)\n  -p, --preset \u003ctype\u003e      Preset of build target (e.g., vue, next, javascript)\n  --polyfills              Use node polyfills in build (default: true)\n  -w, --worker             Enable worker mode with addEventListener signature (default: false)\n  -d, --dev                Build in development mode (default: false)\n  -x, --experimental       Enable experimental features (default: false)\n```\n\n### `dev`\nStarts a local development environment.\n\n```shell\nef dev [entry] [options]\n\nArguments:\n  entry                    Specify the entry file (default: .edge/worker.dev.js)\n\nOptions:\n  -p, --port \u003cport\u003e        Specify the port (default: \"3333\")\n  -x, --experimental       Enable experimental features (default: false)\n```\n\n### `config`\nManages Azion configuration settings with CRUD operations.\n\n```shell\nef config \u003ccommand\u003e [options]\n\nCommands:\n  create              Create a new configuration property\n  read                Read configuration properties\n  update              Update existing configuration properties\n  delete              Delete configuration properties\n\nOptions:\n  -k, --key \u003ckey\u003e     Property key (e.g., build.preset or applications[0].name)\n  -v, --value \u003cvalue\u003e Value to be set (for create/update commands)\n  -a, --all           Read or delete entire configuration (for read/delete commands)\n\nExamples:\n  $ ef config create -k \"build.preset\" -v \"typescript\"\n  $ ef config read -k \"applications[0].name\"\n  $ ef config update -k \"build.bundler\" -v \"esbuild\"\n  $ ef config delete -k \"build.polyfills\"\n  $ ef config read --all\n```\n\n### `presets`\nManages presets for Azion projects.\n\n```shell\nef presets \u003ccommand\u003e [preset]\n\nCommands:\n  ls                  List all available presets\n  config              Get Azion configuration file for a specific preset\n\nArguments:\n  preset              Preset name (required for config command)\n\nExamples:\n  $ ef presets ls\n  $ ef presets config react\n  $ ef presets config next\n```\n\n### `store`\nManages store configuration.\n\n```shell\nef store \u003ccommand\u003e [options]\n\nCommands:\n  init                Initialize store configuration\n  destroy             Remove store configuration\n\nOptions:\n  -c, --config \u003cjson\u003e Configuration in JSON format\n  -s, --scope \u003cscope\u003e Scope of the store (default: global)\n```\n\n### `manifest`\nManages manifest files for Azion.\n\n```shell\nef manifest [action] [options]\n\nArguments:\n  action             Action to perform: \"transform\" (JSON to JS) or \"generate\" (config to manifest)\n                    (default: \"generate\")\n\nOptions:\n  -e, --entry \u003cpath\u003e  Path to the input file or configuration file\n  -o, --output \u003cpath\u003e Output file/directory path\n\nExamples:\n  $ ef manifest transform -e manifest.json -o azion.config.js\n  $ ef manifest generate -e azion.config.js -o .edge\n  $ ef manifest -e azion.config.js -o .edge\n```\n\n## Configuration\n\nThe configuration file (`azion.config.js` or `azion.config.ts`) offers a robust configuration system for Bundler. With Azion Bundler, you can extend configurations and leverage pre-configured framework presets for immediate use. The tool empowers users to create their own automations and extensions, making it highly customizable for specific project needs.\n\nAs the JavaScript engine powering the [Azion CLI](https://github.com/aziontech/azion), it seamlessly integrates with [Azion Libraries](https://github.com/aziontech/lib) to read presets and pre-configured bundler settings from `azion/bundler` and framework presets from `azion/presets`. The bundler follows a modular architecture with specialized modules like `@build`, `@prebuild`, and `@postbuild` through the `build` command.\n\nThe configuration is divided into two main areas:\n- The `build` property manages all bundler-related settings, including entry points, presets, and build configurations\n- Other properties (like domain, origin, cache, rules) are related to Azion CDN and Edge Computing platform settings\n\nWhile these hooks are pre-configured in framework presets, you can customize them in your `azion.config.ts` to fit your specific needs. You can either create your own configuration from scratch or extend existing presets. Here's an example of extending the Next.js preset:\n\n```typescript\nimport { defineConfig } from 'azion';\nimport type { AzionPrebuildResult, AzionConfig } from 'azion/config';\nimport { emscripten } from 'azion/presets';\n\nexport default defineConfig({\n  build: {\n    extend: (config) =\u003e {\n      config.define = {\n        ...config.define,\n        'global.customFeature': 'JSON.stringify(true)',\n        'process.env.CUSTOM_VAR': 'JSON.stringify(\"value\")'\n      }\n      return config\n    },\n    preset: {\n      ...emscripten,\n      prebuild: async (config: AzionConfig, ctx: BuildContext): Promise\u003cAzionPrebuildResult\u003e =\u003e {\n        // Your custom prebuild logic here\n        const result = await doSomething();\n        return {\n          ...result,\n        }\n      }\n    }\n  }\n});\n```\n\n## Build Process Flow\n\n1. **Config Validation**\n   - Validates user configuration using `validateConfig`\n   - Ensures configuration schema compliance\n   - Early error detection and user feedback\n\n2. **Dependencies Check**\n   - Verifies required dependencies are installed\n   - Validates build environment requirements\n\n3. **Preset Resolution** (`@modules/preset`)\n   - Resolves preset from string name or custom module\n   - Loads built-in presets from azion/presets\n   - Validates preset interface and metadata\n\n4. **Build Config Setup** (`@modules/config`)\n   - Resolves configuration priorities in the following order:\n     1. CLI arguments (highest priority)\n     2. User config file (`azion.config.js`)\n     3. Preset defaults (lowest priority)\n   - Sets up bundler configuration\n   - Configures build options and extensions\n\n5. **Prebuild Phase** (`@modules/prebuild`)\n   - Executes preset's prebuild hooks\n   - Prepares build environment and dependencies\n   - Framework-specific build preparations\n\n6. **Handler Resolution** (`@modules/handler`)\n   - Resolves entry point/handler from CLI args, preset, or user config\n   - Validates file existence and accessibility\n   - Supports multiple entry points\n\n7. **Worker Setup** (`@modules/worker`)\n   - Processes handler files and converts to worker-compatible format\n   - Detects handler patterns (ES Modules, Service Worker, Legacy)\n   - Generates appropriate wrappers for development/production\n   - Creates temporary worker files for bundling\n\n8. **Core Build** (`@modules/core`)\n   - Processes bundler configuration (esbuild/webpack)\n   - Handles file imports and dependencies\n   - Applies polyfills and transformations\n   - Generates optimized output\n\n9. **Cleanup**\n   - Removes temporary files created during build\n   - Cleans up intermediate build artifacts\n\n10. **Postbuild Phase** (`@modules/postbuild`)\n    - Executes preset's postbuild hooks\n    - Post-processing optimizations\n    - Asset finalization\n\n11. **Bindings Setup** (`@modules/bindings`) [Future]\n    - Configures Azion platform bindings\n    - Sets up edge functions connections\n    - *Currently in development*\n\n12. **Storage Setup** (`@modules/storage`) [Future]\n    - Configures edge storage connections\n    - Sets up data persistence layers\n    - *Currently in development*\n\n13. **Environment Setup** (`@modules/environment`)\n    - Creates initial `azion.config.js` from preset if none exists\n    - Merges configurations (user config takes precedence over preset defaults)\n    - Stores build settings locally for development and subsequent builds\n\n14. **Environment Variables**\n    - Copies and processes environment variables\n    - Sets up runtime environment context\n\n## Documentation\n\n- [Handler Patterns](docs/handler-patterns.md)\n- [Node.js APIs](docs/nodejs-apis.md)\n- [Nextjs](docs/nextjs.md)\n- [Rust/Wasm example](https://github.com/aziontech/bundler-examples/tree/main/examples/rust-wasm-yew-ssr/)\n- [Emscripten/Wasm example](https://github.com/aziontech/bundler-examples/tree/main/examples/emscripten-wasm/)\n- [Env vars example](https://github.com/aziontech/bundler-examples/tree/main/examples/javascript/simple-js-env-vars)\n- [Storage example](https://github.com/aziontech/bundler-examples/tree/main/examples/javascript/simple-js-esm-storage)\n- [Firewall example](https://github.com/aziontech/bundler-examples/tree/main/examples/javascript/simple-js-firewall-event)\n\n## Supported Features\n\nE2E tests run daily in the [Bundler Examples](https://github.com/aziontech/bundler-examples/tree/main/examples) to ensure that the presets and frameworks continue to work correctly.\n\nTable:\n| Test                                 | Status |\n| ------------------------------------ | ------ |\n| Next 14 2 15 Middleware              | ✅      |\n| Next 13 5 6 I18n                     | ✅      |\n| Next 12 3 4 I18n                     | ✅      |\n| Hexo Static                          | ✅      |\n| Next 13 5 6 Middleware               | ✅      |\n| Next 12 3 4 Middleware               | ✅      |\n| Next Node Pages 12 3 1               | ✅      |\n| Next 13 5 6 Config                   | ✅      |\n| Next 12 3 4 Config                   | ✅      |\n| Html                                 | ✅      |\n| Next Static                          | ✅      |\n| Gatsby Static                        | ✅      |\n| Next Node Pages 12 3 1 Fs            | ✅      |\n| Sveltekit Static                     | ✅      |\n| Vue Vite Static                      | ✅      |\n| Sveltekit Ssr                        | ✅      |\n| Next 12 Static                       | ✅      |\n| Hugo                                 | ✅      |\n| Astro Static                         | ✅      |\n| Qwik Static                          | ✅      |\n| Simple Js Env Vars                   | ✅      |\n| Eleventy Static                      | ✅      |\n| Opennext Ssr                         | ✅      |\n| Simple Js Network List               | ✅      |\n| Angular Static                       | ✅      |\n| React Static                         | ✅      |\n| Svelte Static                        | ✅      |\n| Stencil Static                       | ✅      |\n| Vitepress Static                     | ✅      |\n| Preact Static                        | ✅      |\n| Vuepress Static                      | ✅      |\n| Nuxt Static                          | ✅      |\n| Docusaurus Static                    | ✅      |\n| Simple Js Firewall Event             | ✅      |\n| Nuxt Ssr                             | ✅      |\n| Simple Js Network List With Firewall | ✅      |\n| Jekyll Static                        | ⚠️     |\n| Simple Js Esm Worker                 | ✅      |\n| Simple Js Esm Node                   | ✅      |\n| Simple Ts Esm                        | ⚠️     |\n| Simple Js Esm                        | ⚠️     |\n\nLast test run date: 03/03/26 04:02:28 AM\n\n## Contributing\n\nCheck the [Contributing doc](CONTRIBUTING.md).\n\n## License\n\n[MIT](LICENSE.md)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faziontech%2Fbundler","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faziontech%2Fbundler","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faziontech%2Fbundler/lists"}