bundle or webpack-bundle is a command-line tool that builds the bundle for the provided project.
In the root of an existing project, run this command in your terminal of choice:
To stay compatible with the @react-native-community/cli command, the following flags are included but are not functional:
--config-cmd--entry-filestringPath to the root JS file, either absolute or relative to JS root.
--platformstring"ios"Either "ios" or "android".
--devbooleantrueEnables development warnings and disables production optimizations.
--minifybooleanAllows overriding whether bundle is minified. This defaults to false if dev is true, and true if dev is false. Disabling minification can be useful for speeding up production builds for testing purposes.
--bundle-outputstringFile name where to store the resulting bundle, ex. /tmp/groups.bundle.
--sourcemap-outputstringFile name where to store the sourcemap file for resulting bundle, ex. /tmp/groups.map.
--assets-deststringDirectory name where to store assets referenced in the bundle.
--jsonstringStores stats in a file.
--statsstringInstructs Rspack on how to treat the stats. Use with --json to store stats in a file.
'errors-only' - only output when errors happen'errors-warnings' - only output errors and warnings happen'minimal' - only output when errors or new compilation happen'none' - output nothing'normal' - standard output'verbose' - output everything'detailed' - output everything except chunkModules and chunkRootModules'summary' - output webpack version, warnings count and errors countExample:
More details: Rspack documentation
--reset-cachebooleanResets the transformation cache.
--verbosebooleanEnables verbose logging.
--watchbooleanfalseWatch for file changes.
--max-workersnumber(Rspack only) The maximum number of workers to use for transformation parallelization. By default, the number of workers is derived from available CPU cores.
--configstringPath to a bundler config file, e.g rspack.config.js.
--webpackConfigstring--config insteadPath to a bundler config file, e.g webpack.config.js.
-h, --helpDisplay help for command.