# react/metro

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/react-metro).**

5,608 stars · 682 forks · JavaScript · MIT

## Links

- GitHub: https://github.com/react/metro
- Homepage: https://metrobundler.dev
- awesome-repositories: https://awesome-repositories.com/repository/react-metro.md

## Topics

`bundler` `javascript` `react-native`

## Description

Metro is a JavaScript bundler designed for React Native environments. It functions as a system for resolving dependencies, transforming source code, and packaging JavaScript and assets into bundles for execution.

The project includes a development bundler server that hosts assets via HTTP and provides hot module replacement. It features a module resolver that handles platform-specific file extensions and a source code transformer that converts code into tree structures for optimization and minification.

The toolset covers programmatic bundle generation, source map creation, and file system caching to avoid redundant transformations. It also provides capabilities for asset management, polyfill injection, and secure server configuration using TLS certificates for encrypted endpoints.

Monitoring tools are included to track bundling status and log performance metadata for startup and update events.

## Tags

### Mobile Development

- [React Native Bundlers](https://awesome-repositories.com/f/mobile-development/react-native-bundlers.md) — Packages JavaScript code and assets into single bundles optimized for execution within React Native applications.
- [Development Workflow Tools](https://awesome-repositories.com/f/mobile-development/development-workflow-tools.md) — Runs a local development server to deliver bundles and assets to mobile devices during active coding.

### Web Development

- [JavaScript Bundling Workflows](https://awesome-repositories.com/f/web-development/javascript-bundling-workflows.md) — Resolves dependencies from a root file to create a packaged JavaScript bundle with minification and platform targeting. ([source](https://metrobundler.dev/docs/getting-started))
- [React Native](https://awesome-repositories.com/f/web-development/create-react-app-customizations/project-scaffolders/react-native.md) — Functions as a specialized bundler that resolves dependencies and packages code specifically for React Native environments.
- [Build Automation Pipelines](https://awesome-repositories.com/f/web-development/front-end-development-workflows/build-automation-pipelines.md) — Programmatically generates bundles and source maps to integrate into automated deployment or build pipelines.

### Development Tools & Productivity

- [Bundled Asset Serving](https://awesome-repositories.com/f/development-tools-productivity/bundled-asset-serving.md) — Serves generated JavaScript bundles and assets via a local HTTP server for rapid development deployment.
- [Development Bundler Servers](https://awesome-repositories.com/f/development-tools-productivity/development-bundler-servers.md) — Runs a local HTTP server to handle requests for bundles and assets during active development. ([source](https://metrobundler.dev/docs/getting-started))
- [Build Caches](https://awesome-repositories.com/f/development-tools-productivity/build-caches.md) — Uses storage adapters to persist processed modules on disk to prevent redundant work across build cycles. ([source](https://metrobundler.dev/docs/configuration))
- [Programmatic Bundle APIs](https://awesome-repositories.com/f/development-tools-productivity/build-tooling/build-performance-optimization/build-optimization-tools/bundle-optimizers/asset-bundling/programmatic-bundle-apis.md) — Provides a promise-based programmatic interface to generate bundles, source maps, and assets for build automation. ([source](https://metrobundler.dev/docs/getting-started))
- [Development Servers](https://awesome-repositories.com/f/development-tools-productivity/development-environment-management/development-environments/development-workflow-orchestration/development-servers.md) — Ships a local server providing hot module replacement to accelerate frontend and application iteration.
- [Asynchronous Bundle Pipelines](https://awesome-repositories.com/f/development-tools-productivity/source-bundling/asynchronous-bundle-pipelines.md) — Executes the bundling process as an asynchronous pipeline returning the final assets and source maps.
- [Source Map Generators](https://awesome-repositories.com/f/development-tools-productivity/source-map-generators.md) — Generates mapping files to correlate transformed production code back to the original source for debugging. ([source](https://metrobundler.dev/docs/getting-started))

### DevOps & Infrastructure

- [Module Dependency Graphs](https://awesome-repositories.com/f/devops-infrastructure/dependency-graph-engines/module-dependency-graphs.md) — Traverses import trees to build a complete directed graph of required modules and assets.
- [Platform-Specific Source Resolution](https://awesome-repositories.com/f/devops-infrastructure/cicd-pipeline-automation/core-build-engines/build-tooling/build-configuration-governance/platform-specific-source-resolution.md) — Automatically selects source files by matching platform-specific extensions during the module discovery phase.

### Programming Languages & Runtimes

- [Module Resolution](https://awesome-repositories.com/f/programming-languages-runtimes/language-ecosystems-tooling/module-management/module-resolution.md) — Defines how the bundler locates files using source extensions, package entry fields, and custom algorithms. ([source](https://metrobundler.dev/docs/configuration))
- [Module Resolvers](https://awesome-repositories.com/f/programming-languages-runtimes/language-ecosystems-tooling/module-management/module-resolution/module-resolvers.md) — Provides a configurable lookup engine that resolves file paths and package entry fields based on a root file.
- [Source Code Transformation Engines](https://awesome-repositories.com/f/programming-languages-runtimes/source-code-compilers/source-code-templates/source-code-transformation-engines.md) — Converts source code into intermediate tree structures through a pluggable transformation pipeline before bundling.
- [JavaScript Source Transformers](https://awesome-repositories.com/f/programming-languages-runtimes/source-code-compilers/source-code-templates/source-code-transformation-engines/javascript-source-parsers/javascript-source-transformers.md) — Provides a transformation pipeline that converts source code into tree structures for optimization and minification.
- [Persistent Module Caches](https://awesome-repositories.com/f/programming-languages-runtimes/abstract-syntax-tree-parsing/parsed-ast-caching/persistent-module-caches.md) — Persists processed module outputs and symbol tables on disk to avoid redundant transformations across build cycles.
- [Platform-Suffix Asset Resolution](https://awesome-repositories.com/f/programming-languages-runtimes/module-path-resolution/import-path-resolution/runtime-asset-path-resolution/platform-suffix-asset-resolution.md) — Retrieves correct file paths for assets based on platform suffixes or resolution requirements. ([source](https://metrobundler.dev/docs/getting-started))
- [Pluggable Compiler Integrations](https://awesome-repositories.com/f/programming-languages-runtimes/source-code-compilers/pluggable-compiler-integrations.md) — Allows replacing the default compiler or minifier to customize source code processing and optimization. ([source](https://metrobundler.dev/docs/configuration))

### Software Engineering & Architecture

- [Source Directory Configuration](https://awesome-repositories.com/f/software-engineering-architecture/source-file-organization/source-root-configurators/source-directory-configuration.md) — Controls which folders are scanned for source files and excludes paths using regular expressions. ([source](https://metrobundler.dev/docs/configuration))
