rollup
rollup (latest known version: 4.62.2) has 6 known breaking changes on record, each backed by a source URL.
Security advisories
Recent changes
Version 4.0.0 is a semver-major release over 3.30.0, but no breaking change was detected in the release notes text - flagged for manual review.
Version 3.0.0 is a semver-major release over 2.79.2, but no breaking change was detected in the release notes text - flagged for manual review.
* Rollup now requires at least Node 10 to run, or a sufficiently modern browser (#3346) * The file structure of Rollup's ESM builds has changed: - The main ESM entry point is now at `rollup/dist/es/rollup.js` instead of `rollup/dist/rollup.es.js` - The ESM browser build is at `rollup/dist/es/rollup.browser.js` instead of `rollup/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/es` subfolder instead of `rollup/dist` (#3391) * The "watch.chokidar" option no longer accepts a `boolean` value 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 (#3331) * Modules that are completely tree-shaken will no longer be listed as part of any chunks in `generateBundle` * The `experimentalOptimizeChunks` and `chunkGroupingSize` options have been removed * [acorn](https://github.com/acornjs/acorn) plugins can only be used if they accept a passed-in acorn instance instead of importing it themselves. See https://github.com/acornjs/acorn/pull/870#issuecomment-527339830 for what needs to be done to make plugins compatible that do not support this yet (#3391) * Emitted chunks now have the TypeScript type `UInt8Array` instead of `Buffer`. A `Buffer` can still be used, though (#3395) * 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 (#3395) * The signature of the `writeBundle` plugin hook has been changed to match `generateBundle`: The bundle object is now passed as second parameter instead of first and the first parameter is the output options (#3361) * The following plugin hooks have been removed: - ongenerate: use `generateBundle` instead - onwrite: use `writeBundle` instead - transformBundle: use `renderChunk` instead - transformChunk: use `renderChunk` instead * You can no longer access `this.watcher` on the plugin context. * The `transform` hook can no longer return `dependencies`. * The `treeshake.pureExternalModules` option will now show a deprecation warning when used: use `treeshake.moduleSideEffects: 'no-external'` instead * Using `import.meta.ROLLUP_ASSET_URL_<..>` and `import.meta.ROLLUP_CHUNK_URL_<..>` in code will now show warnings: use `import.meta.ROLLUP_FILE_URL_<..>` instead * The `resolveAssetUrl` hook will now show a deprecation warning when used: use `resolveFileUrl` instead * The following plugin context functions will show warnings when used: - `this.emitAsset`: use `this.emitFile` - `this.emitChunk`: use `this.emitFile` - `this.getAssetFileName`: use `this.getFileName` - `this.getChunkFileName`: use `this.getFileName` - `this.isExternal`: use `this.resolve` - `this.resolveId`: use `this.resolve` * Directly adding properties to the bundle object in the `generateBundle` is deprecated will show a warning (removing properties is allowed, though): Use `this.emitFile` * Accessing `chunk.isAsset` on the bundle is deprecated: Use `chunk.type === 'asset'` instead * The error code for a missing `name` property when targeting UMD has been changed to `MISSING_NAME_OPTION_FOR_IIFE_EXPORT` to emphasize this is needed for the IIFE part of UMD (#3393)
* Several (mostly deprecated) options have been removed or renamed (#2293, #2409): - banner -> output.banner - dest -> output.file - entry -> input - experimentalCodeSplitting -> now always active - experimentalDynamicImport -> now always active - experimentalPreserveModules -> preserveModules - exports -> output.exports - extend -> output.extend - footer -> output.footer - format -> output.format - freeze -> output.freeze - globals -> output.globals - indent -> output.indent - interop -> output.interop - intro -> output.intro - load -> use plugin API - moduleName -> output.name - name -> output.name - noConflict -> output.noConflict - output.moduleId -> output.amd.id - outro -> output.outro - paths -> output.paths - preferConst -> output.preferConst - pureExternalModules -> treeshake.pureExternalModules - resolveExternal -> use plugin API - resolveId -> use plugin API - sourcemap -> output.sourcemap - sourceMap -> output.sourcemap - sourceMapFile -> output.sourcemapFile - strict -> output.strict - targets -> use output as an array - transform -> use plugin API - useStrict -> output.strict * In general, output options can no longer be used as input options (#2409) * `bundle.generate` and `bundle.write` now return a new format (#2293) * Several plugin hooks have become deprecated and will display warnings when used (#2409): - transformBundle - transformChunk - ongenerate - onwrite * Plugin transform dependencies are deprecated in favour of using the `this.addWatchFile` plugin context function (#2409) * Accessing `this.watcher` in plugin hooks is deprecated in favour of the `watchChange` plugin hook and the `this.addWatchFile` plugin context function (#2409) * Using dynamic import statements will by default create a new chunk unless `inlineDynamicImports` is used (#2293) * Rollup now uses acorn@6 which means that acorn plugins must be compatible with this version; acorn is now external for non-browser builds to make plugins work (#2293)
* `optimizeChunks` is renamed to `experimentalOptimizeChunks` to reflect this feature is not production-ready yet (#2575)
Check what changed for rollup since your installed version, live.
Open the playground →