Registry / devops / metro-bundler-cli

metro-bundler-cli

JSON →
library1.0.7jsnpmunverified

A CLI tool extending the official Metro bundler to enable bundle splitting for React Native applications. Version 1.0.7 uses hash-based module IDs (content + path) for stability across projects, unlike the official incremental IDs or module-name-based approaches. It supports generating base and business bundles to optimize loading times. Stable module IDs are optional (use-stable-id flag). The tool is primarily for advanced React Native developers needing code splitting beyond Metro's defaults. No regular release cadence; appears maintained but not actively updated.

npm install metro-bundler-cli
INSTALL
IMPORT
SIG · METRO-BUNDLER-CLI
M
metro-bundler-cli
devopsjavascriptv1.0.7
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

default
import metroBundlerCli from 'metro-bundler-cli'
const metroBundlerCli = require('metro-bundler-cli')
The package is a CLI tool, not a library. Importing it programmatically is uncommon; typically used via command line.

Shows how to generate a business bundle excluding a base bundle manifest, using stable IDs.

npx metro-bundler bundle --entry-file index.js --bundle-output dist/business.jsbundle --assets-dest dist --platform ios --dev false --use-stable-id true --manifest-output dist/business.manifest.json --exclude dist/base.manifest.json
metro-bundler-cli --version
Debug
Known issues
gotchaStable module ID is not the default behavior; you must explicitly set --use-stable-id true.
fix
Add --use-stable-id true to the CLI command.
affects: >=1.0.0
deprecatedPackage has not been updated since 2018; may not be compatible with newer React Native or Metro versions.
fix
Consider using Metro's built-in bundle splitting or other maintained alternatives.
affects: *
Errors
Common errors & fixes
Error: Cannot find module 'metro-bundler-cli'
Package not installed globally or locally.
fix
Run: npm install -g metro-bundler-cli or npm install --save metro-bundler-cli
Unknown option: --use-stable-id
Using an older version of the package that doesn't support this flag.
fix
Update to the latest version: npm update -g metro-bundler-cli
Upgrade
Version history
1.0.7latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
2 hits · last 30 days
node
2
Resources
metro-bundler-cli — npm install metro-bundler-cli · libregistry