{"library":"react-native-esbuild","title":"react-native-esbuild","description":"A fast bundler and dev server for React Native that leverages esbuild instead of Metro. Current stable version is 0.6.0, with updates supporting React Native 0.72. Typically released every few months. Key differentiators: 10-50x faster bundling, tree shaking resulting in ~21% smaller bundles, drop-in replacement for Metro, support for custom transformers and environment variables. Peer dependencies include @babel/core >=7.0.0 and esbuild >=0.17. Compatible with out-of-tree platforms (macOS, Windows) and offers interactive mode.","language":"javascript","status":"active","last_verified":"Fri May 01","install":{"commands":["npm install react-native-esbuild"],"cli":{"name":"react-native-esbuild","version":null}},"imports":["const { commands } = require('react-native-esbuild');","const { createEsbuildCommands } = require('react-native-esbuild');","const { babelPlugin } = require('react-native-esbuild');"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"// Configure react-native-esbuild as a CLI plugin\n// File: react-native.config.js\nconst { commands, createEsbuildCommands, babelPlugin } = require('react-native-esbuild');\n\n// Option 1: Use default commands\nmodule.exports = { commands };\n\n// Option 2: Customize with createEsbuildCommands\nconst customCommands = createEsbuildCommands((config) => ({\n  ...config,\n  plugins: config.plugins.concat(\n    babelPlugin({\n      filter: /src\\/my-babel-components\\/.+\\.tsx?$/\n    })\n  )\n}));\n\nmodule.exports = { commands: customCommands };\n\n// Then run:\n// npx react-native esbuild-start --port 8081\n// npx react-native esbuild-bundle --platform android --dev false","lang":"javascript","description":"Shows how to configure react-native-esbuild as a CLI plugin, with optional custom esbuild configuration and Babel plugin, then run start or bundle commands.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}