{"id":18758,"library":"rn-bundler","title":"metro-bundler-cli","description":"A CLI tool that extends the official React Native Metro bundler to support stable module IDs and bundle splitting. Version 1.0.7 provides hash-based module IDs (content + path) for more stable splits compared to incremental IDs or project-name-based approaches. Enables splitting into base and business bundles to reduce download/load times. Last release date unknown; appears to be in maintenance mode. Key differentiators: uses content hash for module IDs, avoids reliance on project name, and provides manifest-output and exclude options for split bundling.","status":"maintenance","version":"1.0.7","language":"javascript","source_language":"en","source_url":"https://github.com/Livyli/metro","tags":["javascript","react-native","metro-bundler","cli"],"install":[{"cmd":"npm install rn-bundler","lang":"bash","label":"npm"},{"cmd":"yarn add rn-bundler","lang":"bash","label":"yarn"},{"cmd":"pnpm add rn-bundler","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Depends on React Native's metro bundler for bundling React Native projects.","package":"react-native","optional":true}],"imports":[],"quickstart":{"code":"// Install: npm install --global metro-bundler-cli\n// Then run:\nmetro-bundler bundle \\\n  --entry-file index.js \\\n  --bundle-output dist/business.jsbundle \\\n  --assets-dest dist \\\n  --platform ios \\\n  --dev false \\\n  --use-stable-id true \\\n  --manifest-output dist/manifest.json","lang":"javascript","description":"Shows how to bundle a React Native project with stable module IDs using the metro-bundler-cli CLI tool."},"warnings":[{"fix":"Add --use-stable-id true to your bundle command.","message":"Stable IDs are not the default; must explicitly pass --use-stable-id true to enable hash-based module IDs.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Ensure react-native (which includes metro) is installed as a devDependency.","message":"This tool is a thin wrapper over metro bundler; metro must be installed and configured in your project.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Consider migrating to a maintained bundler solution.","message":"The package is no longer actively maintained; check for alternatives or use with caution.","severity":"deprecated","affected_versions":">=1.0.0"}],"env_vars":null,"last_verified":"2026-04-25T00:00:00.000Z","next_check":"2026-07-24T00:00:00.000Z","problems":[{"fix":"Install react-native or metro manually: npm install --save-dev metro","cause":"metro-bundler-cli expects metro to be installed as a peer dependency.","error":"Error: Cannot find module 'metro'"},{"fix":"Ensure you are using the global installed metro-bundler-cli (not metro directly).","cause":"The flag must be used with the bundled command; verify CLI version.","error":"Error: --use-stable-id flag not recognized"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}