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 torollup.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 areamd,cjs,es,iife,umd,system. pick your fighter. ๐-g,--globals <pairs>โ comma-separate list ofmoduleID:Globalpairs. ๐ฆ-h,--helpโ show this help message. the classic. ๐ญ-i,--input <filename>โ input, as an alternative to<entry file>. ๐-m,--sourcemapโ generate sourcemap. use-m inlinefor 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 ofdefine. ๐ฆ--amd.forceJsExtensionForImportsโ use.jsextension 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-levelthisvalue. ๐--no-dynamicImportInCjsโ write external dynamic CommonJS imports asrequire. ๐ฅ--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__esModuleproperty. ๐--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 anoConflictmethod 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 withnull. ๐--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'andprocess.env.BUILD === 'production'
rollup -c --environment INCLUDE_DEPS,BUILD:production
- create CommonJS
bundle.jsfromsrc/main.js
rollup --format=cjs --file=bundle.js -- src/main.js
- create self-executing IIFE using
window.jQueryandwindow._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
- ubuntu stonking: rollup 3.30.0-5build5 ยท MIT
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms