Skip to content

CLI Options

Bunup supports various command-line options:

sh
bunup [...entries] [options]
OptionAliasDescriptionDefault
--entry <path>Entry file path or glob pattern (use '!' prefix to exclude files)[]
--out-dir <dir>-oOutput directorydist
--format <formats>-fOutput formats (comma-separated: esm,cjs,iife)cjs
--minify-mEnable all minification optionsfalse
--minify-whitespace-mwMinify whitespacefalse
--minify-identifiers-miMinify identifiersfalse
--minify-syntax-msMinify syntaxfalse
--watch-wWatch modefalse
--dts-dGenerate TypeScript declarationsfalse
--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 buildtrue
--splitting-sEnable code splittingFormat 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-onlyGenerate only TypeScript declaration files without JavaScript outputfalse
--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 timesfalse
--silentDisable logging during the build processfalse
--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.