ROLLUP(1)

๐ŸŒˆ NAME ๐ŸŒˆ

ok so hi bestie, welcome to the ROLLUP(1) manual page, general commands manual, and let me just say โ€” rollup is a module bundler for JavaScript and it is literally the moment. ๐Ÿ’– That's the whole name section, that's the vibe, no cap.


โœจ SYNOPSIS โœจ

rollup [options] <entry file>

like. that's it. that's the whole entrance exam. ๐ŸŽ€


๐Ÿ’… OPTIONS ๐Ÿ’…

okay so this is the part where I hold your hand through EVERY single flag, bestie, because there are like a hundred of them and I would never leave you hanging. ๐Ÿซถ

  • -c, --config <filename> โ€” use this config file. if you pass the argument but don't give it a value, it defaults to rollup.config.js. ๐Ÿ’œ
  • -d, --dir <dirname> โ€” directory for chunks. if it's absent, everything just prints to stdout. โœจ
  • -e, --external <ids> โ€” comma-separate list of module IDs to exclude. (yes, the original says "comma-separate", we're keeping it, we don't fix the man page, we love the man page.) ๐ŸŒธ
  • -f, --format <format> โ€” type of output. your choices are amd, cjs, es, iife, umd, system. pick your fighter. ๐Ÿ‘‘
  • -g, --globals <pairs> โ€” comma-separate list of moduleID:Global pairs. ๐Ÿฆ‹
  • -h, --help โ€” show this help message. the classic. ๐Ÿ˜ญ
  • -i, --input <filename> โ€” input, as an alternative to <entry file>. ๐ŸŒŸ
  • -m, --sourcemap โ€” generate sourcemap. use -m inline for an inline map. ๐Ÿ”ฅ
  • -n, --name <name> โ€” name for UMD export. ๐Ÿ’ซ
  • -o, --file <output> โ€” single output file. if it's absent, prints to stdout. ๐Ÿ“
  • -p, --plugin <plugin> โ€” use the plugin specified. may be repeated, so go wild. ๐Ÿ’œ
  • -v, --version โ€” show version number. ๐ŸŽ€
  • -w, --watch โ€” watch files in bundle and rebuild on changes. main character behavior honestly. ๐Ÿ‘‘
  • --amd.autoId โ€” generate the AMD ID based off the chunk name. โœจ
  • --amd.basePath <prefix> โ€” path to prepend to auto generated AMD ID. ๐ŸŒˆ
  • --amd.define <name> โ€” function to use in place of define. ๐Ÿฆ‹
  • --amd.forceJsExtensionForImports โ€” use .js extension in AMD imports. ๐Ÿ’…
  • --amd.id <id> โ€” ID for AMD module (default is anonymous). ๐ŸŽ€
  • --assetFileNames <pattern> โ€” name pattern for emitted assets. ๐ŸŒธ
  • --banner <text> โ€” code to insert at top of bundle (outside wrapper). โญ
  • --chunkFileNames <pattern> โ€” name pattern for emitted secondary chunks. ๐Ÿ’–
  • --compact โ€” minify wrapper code. tiny. adorable. iconic. โœจ
  • --context <variable> โ€” specify top-level this value. ๐ŸŒŸ
  • --no-dynamicImportInCjs โ€” write external dynamic CommonJS imports as require. ๐Ÿ”ฅ
  • --entryFileNames <pattern> โ€” name pattern for emitted entry chunks. ๐ŸŒˆ
  • --environment <values> โ€” settings passed to config file (see the example bestie, I got you). ๐Ÿ’œ
  • --no-esModule โ€” do not add __esModule property. ๐ŸŽ€
  • --exports <mode> โ€” specify export mode (auto, default, named, none). ๐Ÿฆ‹
  • --extend โ€” extend global variable defined by --name. ๐Ÿ‘‘
  • --no-externalImportAssertions โ€” omit import assertions in "es" output. ๐ŸŒธ
  • --no-externalLiveBindings โ€” do not generate code to support live bindings. ๐Ÿ’ซ
  • --failAfterWarnings โ€” exit with an error if the build produced warnings. dramatic and valid. ๐Ÿ˜ญ
  • --filterLogs <filter> โ€” filter log messages. ๐Ÿ“
  • --footer <text> โ€” code to insert at end of bundle (outside wrapper). โญ
  • --no-freeze โ€” do not freeze namespace objects. ๐ŸงŠ nope, wrong emoji, anyway. ๐Ÿ™ˆ
  • --generatedCode <preset> โ€” which code features to use (es5/es2015). ๐Ÿ’…
  • --generatedCode.arrowFunctions โ€” use arrow functions in generated code. ๐Ÿน
  • --generatedCode.constBindings โ€” use "const" in generated code. โœจ
  • --generatedCode.objectShorthand โ€” use shorthand properties in generated code. ๐ŸŒˆ
  • --no-generatedCode.reservedNamesAsProps โ€” always quote reserved names as props. ๐Ÿฆ‹
  • --generatedCode.symbols โ€” use symbols in generated code. ๐Ÿ”ฎ
  • --no-hoistTransitiveImports โ€” do not hoist transitive imports into entry chunks. ๐Ÿ’œ
  • --no-indent โ€” don't indent result. flat. minimalist. ๐ŸŽ€
  • --inlineDynamicImports โ€” create single bundle when using dynamic imports. ๐ŸŒธ
  • --no-interop โ€” do not include interop block. ๐ŸŒŸ
  • --intro <text> โ€” code to insert at top of bundle (inside wrapper). โญ
  • --logLevel <level> โ€” which kind of logs to display. ๐Ÿ‘‘
  • --no-makeAbsoluteExternalsRelative โ€” prevent normalization of external imports. ๐Ÿฆ‹
  • --maxParallelFileOps <value> โ€” how many files to read in parallel. multitasking queen energy. ๐Ÿ”ฅ
  • --minifyInternalExports โ€” force or disable minification of internal exports. โœจ
  • --noConflict โ€” generate a noConflict method for UMD globals. ๐Ÿ•Š๏ธ
  • --outro <text> โ€” code to insert at end of bundle (inside wrapper). โญ
  • --perf โ€” display performance timings. ๐Ÿ’…
  • --no-preserveEntrySignatures โ€” avoid facade chunks for entry points. ๐ŸŽ€
  • --preserveModules โ€” preserve module structure. ๐ŸŒฟ
  • --preserveModulesRoot โ€” put preserved modules under this path at root level. ๐ŸŒˆ
  • --preserveSymlinks โ€” do not follow symlinks when resolving files. ๐Ÿ”—
  • --no-sanitizeFileName โ€” do not replace invalid characters in file names. ๐Ÿ’€
  • --shimMissingExports โ€” create shim variables for missing exports. ๐Ÿซถ
  • --silent โ€” don't print warnings. ๐Ÿคซ
  • --sourcemapBaseUrl <url> โ€” emit absolute sourcemap URLs with given base. ๐ŸŒ
  • --sourcemapExcludeSources โ€” do not include source code in source maps. ๐Ÿฆ‹
  • --sourcemapFile <file> โ€” specify bundle position for source maps. ๐Ÿ“
  • --sourcemapFileNames <pattern> โ€” name pattern for emitted sourcemaps. ๐ŸŒธ
  • --stdin=ext โ€” specify file extension used for stdin input. ๐Ÿ’œ
  • --no-stdin โ€” do not read "-" from stdin. โœ‹
  • --no-strict โ€” don't emit "use strict"; in the generated modules. rebel era. ๐Ÿ˜ค
  • --strictDeprecations โ€” throw errors for deprecated features. ๐Ÿ“ข
  • --no-systemNullSetters โ€” do not replace empty SystemJS setters with null. ๐ŸŽ€
  • --no-treeshake โ€” disable tree-shaking optimisations. ๐ŸŒณ๐Ÿšซ
  • --no-treeshake.annotations โ€” ignore pure call annotations. ๐Ÿท๏ธ
  • --treeshake.correctVarValueBeforeDeclaration โ€” deoptimize variables until declared. ๐Ÿฆ‹
  • --treeshake.manualPureFunctions <names> โ€” manually declare functions as pure. ๐Ÿ˜‡
  • --no-treeshake.moduleSideEffects โ€” assume modules have no side effects. ๐ŸŒธ
  • --no-treeshake.propertyReadSideEffects โ€” ignore property access side effects. ๐Ÿ’ซ
  • --no-treeshake.tryCatchDeoptimization โ€” do not turn off try-catch-tree-shaking. ๐Ÿชค
  • --no-treeshake.unknownGlobalSideEffects โ€” assume unknown globals do not throw. ๐Ÿคท
  • --validate โ€” validate output. โœ…
  • --waitForBundleInput โ€” wait for bundle input files. ๐Ÿ•ฐ๏ธ
  • --watch.buildDelay <number> โ€” throttle watch rebuilds. ๐Ÿข
  • --no-watch.clearScreen โ€” do not clear the screen when rebuilding. ๐Ÿงผ๐Ÿšซ
  • --watch.exclude <files> โ€” exclude files from being watched. ๐Ÿ™ˆ
  • --watch.include <files> โ€” limit watching to specified files. ๐Ÿ‘€
  • --watch.onBundleEnd <cmd> โ€” shell command to run on "BUNDLE_END" event. ๐ŸŽฌ
  • --watch.onBundleStart <cmd> โ€” shell command to run on "BUNDLE_START" event. ๐ŸŽฌ
  • --watch.onEnd <cmd> โ€” shell command to run on "END" event. ๐Ÿ
  • --watch.onError <cmd> โ€” shell command to run on "ERROR" event. ๐Ÿšจ
  • --watch.onStart <cmd> โ€” shell command to run on "START" event. ๐Ÿš€
  • --watch.skipWrite โ€” do not write files to disk when watching. ๐Ÿšซ๐Ÿ’พ

๐ŸŒŸ EXAMPLES ๐ŸŒŸ

here comes the fun part bestie, actual receipts ๐Ÿ’–

  • use settings in config file
rollup -c
  • in config file, process.env.INCLUDE_DEPS === 'true' and process.env.BUILD === 'production'
rollup -c --environment INCLUDE_DEPS,BUILD:production
  • create CommonJS bundle.js from src/main.js
rollup --format=cjs --file=bundle.js -- src/main.js
  • create self-executing IIFE using window.jQuery and window._ as external globals
rollup -f iife --globals jquery:jQuery,lodash:_ \
  -i src/app.js -o build/app.js -m build/app.js.map

๐Ÿ“ NOTES ๐Ÿ“

  • when piping to stdout, only inline sourcemaps are permitted. do not skip this one, it will humble you. ๐Ÿ˜ญ

for more information visit https://rollupjs.org


ok that's the whole page, you ate it, you're so good at this ๐Ÿซถ๐Ÿ’…โœจ

and one last thing โ€” this was the rollup manual page, version 3.30.0, dated June 2026, filed under ROLLUP(1) in the general commands manual. go bundle something iconic, bestie. ๐Ÿ‘‘๐Ÿ’–

๐Ÿ“ฆ where this page comes from