MCPcopy
hub / github.com/react/metro

github.com/react/metro @v0.85.0 sqlite

repository ↗ · DeepWiki ↗ · release v0.85.0 ↗
3,150 symbols 7,862 edges 747 files 173 documented · 5%
README

Metro

MIT licensed npm package version facebook/metro/nightly-tests Code coverage Follow @MetroBundler on Twitter

🚇 The JavaScript bundler for React Native.

  • 🚅 Fast: We aim for sub-second reload cycles, fast startup and quick bundling speeds.
  • ⚖️ Scalable: Works with thousands of modules in a single application.
  • ⚛️ Integrated: Supports every React Native project out of the box.

Installation

Metro is included with React Native — see the React Native docs to quickly get started ⏱️.

To add Metro to an existing project, see our Getting Started guide.

Documentation

All available documentation, including on configuring Metro, can be found on the Metro website.

Source code for documentation is located in this repository under docs/.

Contributing

Metro was previously part of the react-native repository. In this standalone repository it is easier for the team working on Metro to respond to issues and pull requests. See react-native#13976 for the initial announcement.

Code of Conduct

Meta has adopted a Code of Conduct that we expect project participants to adhere to. Please read the full text so that you can understand what actions will and will not be tolerated.

Contributing guide

Read our contributing guide to learn about our development process, how to propose bug fixes and improvements, and how to build and test your changes to Metro.

Discussions

Larger discussions and proposals concerning React Native and Metro are discussed in @react-native-community/discussions-and-proposals.

License

Metro is MIT licensed, as found in the LICENSE file.

Extension points exported contracts — how you extend this code

MetadataWorker (Interface)
(no doc) [6 implementers]
packages/metro-file-map/types/flow-types.d.ts
IConsumer (Interface)
(no doc) [6 implementers]
packages/metro-source-map/types/Consumer/types.d.ts
CacheStore (Interface)
(no doc) [2 implementers]
packages/metro-cache/types/types.d.ts
ReadOnlyCountingSet (Interface)
(no doc) [1 implementers]
packages/metro/types/lib/CountingSet.d.ts
PerfLogger (Interface)
(no doc) [1 implementers]
packages/metro-config/types/types.d.ts
Chalk (Interface)
(no doc) [1 implementers]
flow-typed/npm/chalk_v4.x.x.js
IntervalHistogram (Interface)
(no doc) [1 implementers]
flow-typed/environment/node.js
TransformPlugins (Interface)
(no doc)
packages/metro-transform-plugins/types/index.d.ts

Core symbols most depended-on inside this repo

toEqual
called by 1189
flow-typed/jest.js
toBe
called by 956
flow-typed/jest.js
push
called by 305
packages/metro-source-map/src/generateFunctionMap.js
toMatchInlineSnapshot
called by 265
flow-typed/jest.js
get
called by 261
packages/metro-cache/src/types.js
set
called by 194
packages/metro-cache/src/types.js
has
called by 142
packages/metro/src/lib/CountingSet.js
toHaveBeenCalled
called by 100
flow-typed/jest.js

Shape

Class 1,348
Function 870
Method 841
Interface 89
Enum 2

Languages

TypeScript100%

Modules by API surface

flow-typed/environment/dom.js344 symbols
flow-typed/environment/bom.js334 symbols
flow-typed/environment/node.js222 symbols
private/metro-memory-fs/src/index.js57 symbols
packages/metro-file-map/types/flow-types.d.ts50 symbols
packages/metro-file-map/src/flow-types.js50 symbols
flow-typed/jest.js47 symbols
packages/metro-symbolicate/src/ChromeHeapSnapshot.js40 symbols
scripts/eslint/rules/sort-imports.js38 symbols
packages/metro/src/ModuleGraph/worker/collectDependencies.js38 symbols
packages/metro-symbolicate/src/Symbolication.js38 symbols
flow-typed/environment/serviceworkers.js38 symbols

Dependencies from manifests, versioned

@babel/code-frame7.29.0 · 1×
@babel/core7.25.2 · 1×
@babel/generator7.29.1 · 1×
@babel/parser7.29.0 · 1×
@babel/plugin-proposal-export-namespace-from7.18.9 · 1×
@babel/plugin-syntax-class-properties7.12.13 · 1×
@babel/plugin-syntax-nullish-coalescing-operator7.8.3 · 1×
@babel/plugin-transform-flow-strip-types7.25.2 · 1×
@babel/plugin-transform-modules-commonjs7.24.8 · 1×
@babel/plugin-transform-react-jsx7.25.2 · 1×
@babel/plugin-transform-runtime7.24.7 · 1×
@babel/preset-typescript7.24.7 · 1×

For agents

$ claude mcp add metro \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact