{"library":"metro-bundler","title":"Metro Bundler","description":"Metro is the JavaScript bundler for React Native, currently at v0.84.3. It is maintained by Meta and releases follow a regular cadence aligned with React Native releases. Metro focuses on sub-second reload cycles, fast startup, and handling thousands of modules. It is deeply integrated with React Native's development workflow, providing Fast Refresh, HMR, and a symmetric asset system. Compared to alternatives like Webpack, Metro is purpose-built for React Native, offering out-of-the-box support for React Native's module system, asset loading, and platform-specific code. It is configurable via metro.config.js and supports both CommonJS and ES modules.","language":"javascript","status":"active","last_verified":"Sat Apr 25","install":{"commands":["npm install metro-bundler"],"cli":{"name":"metro","version":null}},"imports":["import Metro from 'metro'","import { Server } from 'metro'","import { createConnectMiddleware } from 'metro'","import { loadConfig } from 'metro'"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"import Metro from 'metro';\nimport express from 'express';\n\nconst app = express();\nconst config = await Metro.loadConfig();\nconst metroServer = await Metro.runMetro(config);\n\napp.use(metroServer.processRequest.bind(metroServer));\napp.listen(8081, () => {\n  console.log('Metro server running on 8081');\n});","lang":"typescript","description":"Starts a Metro bundler server with custom Express integration.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}