rollup
4.68.5 · 17 Nov 2026MIT170.6M / weekRepositoryHomepagenpmAtom feed
2.80.0 is the newest release of 2.x.
In short
17 breaking5 new4 fixed20 changed
- Breaking
Rollup now requires at least Node 10 to run, or a sufficiently modern browser
- Breaking
The "watch.chokidar" option no longer accepts a
booleanvalue but only an object of parameters that is passed to the bundled Chokidar instance. Chokidar installations by the user will be ignored in favour of the bundled instance - Breaking
Modules that are completely tree-shaken will no longer be listed as part of any chunks in
generateBundle - Breaking
The
experimentalOptimizeChunksandchunkGroupingSizeoptions have been removed - Breaking
- Breaking
Emitted chunks now have the TypeScript type
UInt8Arrayinstead ofBuffer. ABuffercan still be used, though - Breaking
The TypeScript types no longer use ESTree types for AST nodes but a very generic type that does not contain information specific to certain node types
- Breaking
The signature of the
writeBundleplugin hook has been changed to matchgenerateBundle: The bundle object is now passed as second parameter instead of first and the first parameter is the output options
Security
2 advisories affect 2.0.0; 2.80.0 fixes them
- HighRollup 4 has Arbitrary File Write via Path TraversalGHSA-mw96-cpmx-2vgc · 25 Feb 2026Fixed in 2.80.0
- HighDOM Clobbering Gadget found in rollup bundled scripts that leads to XSSGHSA-gcx4-mw62-g8wm · 23 Sep 2024Fixed in 2.79.2
Release note
2020-03-06
For the detailed release notes, see below.
After one year finally a new major:
Welcome rollup@2.0.0!
As any major, it is first and foremost about getting rid of old, deprecated, rotting and smelling stuff. But there are some cool things hidden as well…
Rollup has always been rather small, but we are now back to zero dependencies and 2.5 MB install size! This also means: No hidden TS type dependencies any more that smuggle Node types into your AMD setup. Sorry about this. Fixed.
Watch mode: Always not quite perfect in Rollup. So we decided to bundle chokidar as the watch option for everyone. This makes it simpler for us, but should bring improvements for everyone. Chokidar IS the gold standard here!
This is really the hidden gem here if you do code-splitting: Rollup now uses side-effect detection to not only avoid unnecessary empty imports, it will also create much better chunks. Check out the examples here: #3369
For those living in the future: Rollup can now be imported in Node as an ES-Module—without a bundler: #3391
And for all those Stencils out there who are rebundling Rollup: Rollup is now shipping ES2018 code and has also been restructured via code-splitting so that watch mode and CLI are nicely separate but reuse shared code so you only pull in what you really need.
🕵️♂️But here the details:
Breaking Changes
- Breaking
Rollup now requires at least Node 10 to run, or a sufficiently modern browser
- Breaking
The file structure of Rollup's ESM builds has changed:
The main ESM entry point is now at
rollup/dist/es/rollup.jsinstead ofrollup/dist/rollup.es.jsThe ESM browser build is at
rollup/dist/es/rollup.browser.jsinstead ofrollup/dist/rollup.browser.es.js
In general, the ESM builds now follow the same naming scheme as the CJS builds but are located in the
rollup/dist/essubfolder instead ofrollup/dist(#3391) - Breaking
The "watch.chokidar" option no longer accepts a
booleanvalue but only an object of parameters that is passed to the bundled Chokidar instance. Chokidar installations by the user will be ignored in favour of the bundled instance - Breaking
Modules that are completely tree-shaken will no longer be listed as part of any chunks in
generateBundle - Breaking
The
experimentalOptimizeChunksandchunkGroupingSizeoptions have been removed - Breaking
acorn plugins can only be used if they accept a passed-in acorn instance instead of importing it themselves. See #870 for what needs to be done to make plugins compatible that do not support this yet
- Breaking
Emitted chunks now have the TypeScript type
UInt8Arrayinstead ofBuffer. ABuffercan still be used, though - Breaking
The TypeScript types no longer use ESTree types for AST nodes but a very generic type that does not contain information specific to certain node types
- Breaking
The signature of the
writeBundleplugin hook has been changed to matchgenerateBundle: The bundle object is now passed as second parameter instead of first and the first parameter is the output options - Breaking
The following plugin hooks have been removed:
ongenerate: use
generateBundleinsteadonwrite: use
writeBundleinsteadtransformBundle: use
renderChunkinsteadtransformChunk: use
renderChunkinstead
- Breaking
You can no longer access
this.watcheron the plugin context. - Breaking
The
transformhook can no longer returndependencies. - Breaking
The
treeshake.pureExternalModulesoption will now show a deprecation warning when used: usetreeshake.moduleSideEffects: 'no-external'instead - Breaking
Using
import.meta.ROLLUP_ASSET_URL_<..>andimport.meta.ROLLUP_CHUNK_URL_<..>in code will now show warnings: useimport.meta.ROLLUP_FILE_URL_<..>instead - Breaking
The
resolveAssetUrlhook will now show a deprecation warning when used: useresolveFileUrlinstead - Breaking
The following plugin context functions will show warnings when used:
this.emitAsset: usethis.emitFilethis.emitChunk: usethis.emitFilethis.getAssetFileName: usethis.getFileNamethis.getChunkFileName: usethis.getFileNamethis.isExternal: usethis.resolvethis.resolveId: usethis.resolve
- Breaking
Directly adding properties to the bundle object in the
generateBundleis deprecated will show a warning (removing properties is allowed, though): Usethis.emitFile - Breaking
Accessing
chunk.isAsseton the bundle is deprecated: Usechunk.type === 'asset'instead - Breaking
The error code for a missing
nameproperty when targeting UMD has been changed toMISSING_NAME_OPTION_FOR_IIFE_EXPORTto emphasize this is needed for the IIFE part of UMD
Features
Rollup now bundles Chokidar for a better watch experience
Rollup now bundles acorn again, removing its only external dependency
Do not consider empty imports from side-effect-free modules for chunking and hoist side-effect imports if necessary
Rollup can now be imported as an ES module in Node via
import {rollup} from 'rollup'. Note that this relies on Node's experimental conditional package exports feature and is therefore itself experimentalsystemjscan be used as format alias forsystem
Bug Fixes
Unknown output options now trigger a warning when using the JavaScript API
Rollup will no longer introduce Node types into TypeScript projects that do not use them
Generate correct sourcemaps when tree-shaking occurs in a multi-file bundle
Pull Requests
Bundle Chokidar
Remove experimentalOptimizeChunks
- Breaking
Update minimum required Node version to 10
Remove active deprecations
Change writeBundle signature to match generateBundle
Avoid empty imports from side-effect-free chunks
Rename esm to es everywhere, add systemjs alias
Bundle acorn, allow importing Rollup as Node ES module, update dependencies
Better error code for name-less umd bundle
Remove
@typesdependenciesUpdate magic-string and fix sourcemaps
A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.