Getting Started
Commands

Commands

React Native Esbuild's cli is partially compatible with the React Native cli (opens in a new tab) commands.

The following commands are compatible.

CommandStatus
startsupport
bundlesupport
ram-bundlenot supported

Start

Start the development server for Native(Android, iOS).

rne start
OptionDescriptionDefault value
--hostSet the server hostlocalhost
--portSet the server port8081
--configPath to the bundler configuration file<cwd>/react-native-esbuild.config.js
--verbosePrint all logsfalse
--reset-cacheReset transform cachefalse

Serve

Start the development server for Web.

rne serve
OptionDescriptionDefault value
--entry-fileSet the entry file pathindex.web.js
--hostSet the server hostlocalhost
--portSet the server port8081
--templateSet the template file pathPath to default template
--devSet as development environmenttrue
--minifyEnable minifyfalse
--configPath to the bundler configuration file<cwd>/react-native-esbuild.config.js
--verbosePrint all logsfalse
--reset-cacheReset transform cachefalse

Bundle

Build the bundle for the provided JavaScript entry file.

rne bundle --platform=<android | ios | web> --bundle-output=path/to/bundle
OptionDescriptionDefault value
--entry-fileSet the entry file pathindex.js
--platform(Required) Set the target platform for resolve modules
--bundle-output(Required) Specify the path to store the resulting bundle
--sourcemap-outputSpecify the path to store the source map file for the resulting bundle
--assets-destSpecify the directory path for storing assets referenced in the bundle
--devSet as development environmenttrue
--minifyEnable minifyfalse
--metafileExport Esbuild metafile (opens in a new tab) to working directoryfalse
--configPath to the bundler configuration file<cwd>/react-native-esbuild.config.js
--verbosePrint all logsfalse
--reset-cacheReset transform cachefalse

Cache

Utilities for cache.

Clear

Clear transform cache in the temporary directory.

rne cache clear