Skip to content

CLI Options

Bunup supports various command-line options:

sh
bunup [...entries] [options]
OptionAliasDescriptionDefault
--entry <path>Entry file path []
--entry.<name> <path>Named entry file path -
--out-dir <dir>-oOutput directory dist
--format <formats>-fOutput formats (comma-separated: esm,cjs,iife) cjs
--minify-mEnable all minification options false
--minify-whitespace-mwMinify whitespace false
--minify-identifiers-miMinify identifiers false
--minify-syntax-msMinify syntax false
--watch-wWatch mode false
--dts-dGenerate TypeScript declarations false
--external <deps>-eExternal dependencies (comma-separated) []
--no-external <deps>-neForce include dependencies (comma-separated) -
--target <target>-tTarget environment (node, browser, bun) node
--clean-cClean output directory before build true
--splitting-sEnable code splitting Format dependent
--sourcemap <type>-smSourcemap generation (none,linked,external,inline) none
--banner <text>-bnText to add at the beginning of output files -
--footer <text>-ftText to add at the end of output files -
--public-path <url>-ppPrefix to be appended to import paths in bundled code -
--name <name>-nName for this build configuration -
--resolve-dts <value>-rdResolve external types for declaration files (can be boolean flag or comma-separated package list) false
--dts-only-doGenerate only TypeScript declaration files without JavaScript output false
--preferred-tsconfig-path <path>-tsconfigPath to preferred tsconfig file used for typescript declaration files generation -
--bytecode-bcGenerate bytecode for JavaScript/TypeScript entrypoints to improve startup times false
--silentDisable logging during the build processfalse
--shimsInject Node.js compatibility shims for ESM/CJS interoperability false
--env <mode>Control environment variable handling (inline, disable or PREFIX_*) -
--config <path>Specify a custom path to the configuration file-
--onSuccess <command>Command to execute after a successful build-
--filter <packages>Build only specific packages in a workspace (comma-separated) -
--version-vDisplay version information-
--help-hDisplay help information-

Released under the MIT License.