{"id":18550,"library":"metro-bundler-cli","title":"Metro Bundler CLI","description":"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.","status":"maintenance","version":"1.0.7","language":"javascript","source_language":"en","source_url":"https://github.com/tsyeyuanfeng/metro-bundler-cli","tags":["javascript","react-native","metro-bundler","cli"],"install":[{"cmd":"npm install metro-bundler-cli","lang":"bash","label":"npm"},{"cmd":"yarn add metro-bundler-cli","lang":"bash","label":"yarn"},{"cmd":"pnpm add metro-bundler-cli","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"The package is a CLI tool, not a library. Importing it programmatically is uncommon; typically used via command line.","wrong":"const metroBundlerCli = require('metro-bundler-cli')","symbol":"default","correct":"import metroBundlerCli from 'metro-bundler-cli'"}],"quickstart":{"code":"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","lang":"javascript","description":"Shows how to generate a business bundle excluding a base bundle manifest, using stable IDs."},"warnings":[{"fix":"Add --use-stable-id true to the CLI command.","message":"Stable module ID is not the default behavior; you must explicitly set --use-stable-id true.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Consider using Metro's built-in bundle splitting or other maintained alternatives.","message":"Package has not been updated since 2018; may not be compatible with newer React Native or Metro versions.","severity":"deprecated","affected_versions":"*"}],"env_vars":null,"last_verified":"2026-04-25T00:00:00.000Z","next_check":"2026-07-24T00:00:00.000Z","problems":[{"fix":"Run: npm install -g metro-bundler-cli or npm install --save metro-bundler-cli","cause":"Package not installed globally or locally.","error":"Error: Cannot find module 'metro-bundler-cli'"},{"fix":"Update to the latest version: npm update -g metro-bundler-cli","cause":"Using an older version of the package that doesn't support this flag.","error":"Unknown option: --use-stable-id"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}