🚀 rollup/rollup - Release Notes

v4.39.0 (2025-04-02)

## 4.39.0

_2025-04-02_

### Features

- Do not create separate facade chunks if a chunk would contain several entry modules that allow export extension if there are no export name conflicts (#5891)

### Bug Fixes

- Mark the `id` property as optional in the filter for the `resolveId` hook (#5896)

### Pull Requests

- [#5891](https://github.com/rollup/rollup/pull/5891): chunk: merge allow-extension modules (@wmertens, @lukastaegert)
- [#5893](https://github.com/rollup/rollup/pull/5893): chore(deps): update dependency vite to v6.2.4 [security] (@renovate[bot])
- [#5896](https://github.com/rollup/rollup/pull/5896): fix: resolveId id filter is optional (@sapphi-red)

v4.38.0 (2025-03-29)

## 4.38.0

_2025-03-29_

### Features

- Support `.filter` option in `resolveId`, `load` and `transform` hooks (#5882)

### Pull Requests

- [#5882](https://github.com/rollup/rollup/pull/5882): Add support for hook filters (@sapphi-red)
- [#5894](https://github.com/rollup/rollup/pull/5894): fix(deps): lock file maintenance minor/patch updates (@renovate[bot])
- [#5895](https://github.com/rollup/rollup/pull/5895): chore(deps): update dependency eslint-plugin-unicorn to v58 (@renovate[bot])

v4.37.0 (2025-03-23)

## 4.37.0

_2025-03-23_

### Features

- Support Musl Linux on Riscv64 architectures (#5726)
- Handles class decorators placed before the `export` keyword (#5871)

### Bug Fixes

- Log Rust panic messages to the console when using the WASM build (#5875)

### Pull Requests

- [#5726](https://github.com/rollup/rollup/pull/5726): Add support for linux riscv64 musl (@fossdd, @leso-kn)
- [#5871](https://github.com/rollup/rollup/pull/5871): feat: support decorators before or after export (@TrickyPi)
- [#5875](https://github.com/rollup/rollup/pull/5875): capture Rust panic messages and output them to the console. (@luyahan, @lukastaegert)
- [#5883](https://github.com/rollup/rollup/pull/5883): Pin digest of 3rd party actions (@re-taro)
- [#5885](https://github.com/rollup/rollup/pull/5885): fix(deps): lock file maintenance minor/patch updates (@renovate[bot])

v4.36.0 (2025-03-17)

## 4.36.0

_2025-03-17_

### Features

- Extend `renderDynamicImport` hook to provide information about static dependencies of the imported module (#5870)
- Export several additional types used by Vite (#5879)

### Bug Fixes

- Do not merge chunks if that would create a top-level await cycle between chunks (#5843)

### Pull Requests

- [#5843](https://github.com/rollup/rollup/pull/5843): avoiding top level await circular (@TrickyPi, @lukastaegert)
- [#5870](https://github.com/rollup/rollup/pull/5870): draft for extended renderDynamicImport hook (@iczero, @lukastaegert)
- [#5876](https://github.com/rollup/rollup/pull/5876): Update axios overrides to 1.8.2 (@vadym-khodak)
- [#5877](https://github.com/rollup/rollup/pull/5877): chore(deps): update dependency eslint-plugin-vue to v10 (@renovate[bot])
- [#5878](https://github.com/rollup/rollup/pull/5878): fix(deps): lock file maintenance minor/patch updates (@renovate[bot])
- [#5879](https://github.com/rollup/rollup/pull/5879): fix: export types (@sxzz)

v4.35.0 (2025-03-08)

## 4.35.0

_2025-03-08_

### Features

- Pass build errors to the closeBundle hook (#5867)

### Pull Requests

- [#5852](https://github.com/rollup/rollup/pull/5852): chore(deps): update dependency eslint-plugin-unicorn to v57 (@renovate[bot], @lukastaegert)
- [#5862](https://github.com/rollup/rollup/pull/5862): fix(deps): update swc monorepo (major) (@renovate[bot], @lukastaegert)
- [#5867](https://github.com/rollup/rollup/pull/5867): feat(5858): make closeBundle hook receive the last error (@GauBen)
- [#5872](https://github.com/rollup/rollup/pull/5872): chore(deps): update dependency builtin-modules to v5 (@renovate[bot])
- [#5873](https://github.com/rollup/rollup/pull/5873): chore(deps): update uraimo/run-on-arch-action action to v3 (@renovate[bot])
- [#5874](https://github.com/rollup/rollup/pull/5874): fix(deps): lock file maintenance minor/patch updates (@renovate[bot])

v4.34.9 (2025-03-01)

## 4.34.9

_2025-03-01_

### Bug Fixes

- Support JSX modes in WASM (#5866)
- Allow the CustomPluginOptions to be extended (#5850)

### Pull Requests

- [#5850](https://github.com/rollup/rollup/pull/5850): Revert CustomPluginOptions to be an interface (@sapphi-red, @lukastaegert)
- [#5851](https://github.com/rollup/rollup/pull/5851): Javascript to JavaScript (@dasa, @lukastaegert)
- [#5853](https://github.com/rollup/rollup/pull/5853): chore(deps): update dependency pinia to v3 (@renovate[bot])
- [#5854](https://github.com/rollup/rollup/pull/5854): fix(deps): update swc monorepo (major) (@renovate[bot])
- [#5855](https://github.com/rollup/rollup/pull/5855): fix(deps): lock file maintenance minor/patch updates (@renovate[bot], @lukastaegert)
- [#5860](https://github.com/rollup/rollup/pull/5860): chore(deps): update dependency @shikijs/vitepress-twoslash to v3 (@renovate[bot])
- [#5861](https://github.com/rollup/rollup/pull/5861): chore(deps): update dependency globals to v16 (@renovate[bot])
- [#5863](https://github.com/rollup/rollup/pull/5863): fix(deps): lock file maintenance minor/patch updates (@renovate[bot])
- [#5864](https://github.com/rollup/rollup/pull/5864): chore(deps): lock file maintenance minor/patch updates (@renovate[bot])
- [#5866](https://github.com/rollup/rollup/pull/5866): Add jsx parameter to parseAsync in native.wasm.js (@TrickyPi)

v4.34.8 (2025-02-17)

## 4.34.8

_2025-02-17_

### Bug Fixes

- Do not make assumptions about the value of nested paths in logical expressions if the expression cannot be simplified (#5846)

### Pull Requests

- [#5846](https://github.com/rollup/rollup/pull/5846): return UnknownValue if the usedbranch is unkown and the path is not empty (@TrickyPi)

v4.34.7 (2025-02-14)

## 4.34.7

_2025-02-14_

### Bug Fixes

- Ensure that calls to parameters are included correctly when using try-catch deoptimization (#5842)

### Pull Requests

- [#5840](https://github.com/rollup/rollup/pull/5840): fix(deps): lock file maintenance minor/patch updates (@renovate[bot])
- [#5842](https://github.com/rollup/rollup/pull/5842): Fix prop inclusion with try-catch-deoptimization (@lukastaegert)

v4.34.6 (2025-02-07)

## 4.34.6

_2025-02-07_

### Bug Fixes

- Retain "void 0" in the output for smaller output and fewer surprises (#5838)

### Pull Requests

- [#5835](https://github.com/rollup/rollup/pull/5835): fix(deps): update swc monorepo (major) (@renovate[bot], @lukastaegert)
- [#5838](https://github.com/rollup/rollup/pull/5838): replace undefined with void 0 for operator void (@TrickyPi)

v4.34.5 (2025-02-07)

## 4.34.5

_2025-02-07_

### Bug Fixes

- Ensure namespace reexports always include all properties of all exports (#5837)

### Pull Requests

- [#5836](https://github.com/rollup/rollup/pull/5836): fix(deps): lock file maintenance minor/patch updates (@renovate[bot])
- [#5837](https://github.com/rollup/rollup/pull/5837): Include all paths of reexports if namespace is used (@lukastaegert)

v4.34.4 (2025-02-05)

## 4.34.4

_2025-02-05_

### Bug Fixes

- Do not tree-shake properties if a rest element is used in destructuring (#5833)

### Pull Requests

- [#5833](https://github.com/rollup/rollup/pull/5833): include all properties if a rest element is destructed (@TrickyPi)

v4.34.3 (2025-02-05)

## 4.34.3

_2025-02-05_

### Bug Fixes

- Ensure properties of "this" are included in getters (#5831)

### Pull Requests

- [#5831](https://github.com/rollup/rollup/pull/5831): include the properties that accessed by this (@TrickyPi)

v4.34.2 (2025-02-04)

## 4.34.2

_2025-02-04_

### Bug Fixes

- Fix an issue where not all usages of a function were properly detected (#5827)

### Pull Requests

- [#5827](https://github.com/rollup/rollup/pull/5827): Ensure that functions provided to a constructor are properly deoptimized (@lukastaegert)

v4.34.1 (2025-02-03)

## 4.34.1

_2025-02-03_

### Bug Fixes

- Ensure throwing objects includes the entire object (#5825)

### Pull Requests

- [#5825](https://github.com/rollup/rollup/pull/5825): Ensure that all properties of throw statements are included (@lukastaegert)

v4.34.0 (2025-02-01)

## 4.34.0

_2025-02-01_

### Features

- Tree-shake unused properties in object literals (re-implements #5420) (#5737)

### Pull Requests

- [#5737](https://github.com/rollup/rollup/pull/5737): Reapply object tree-shaking (@lukastaegert, @TrickyPi)

v4.33.0 (2025-02-01)

## 4.33.0

_2025-02-01_

### Features

- Correctly detect literal value of more negated expressions (#5812)

### Bug Fixes

- Use the correct with/assert attribute key in dynamic imports (#5818)
- Fix an issue where logical expressions were considered to have the wrong value (#5819)

### Pull Requests

- [#5812](https://github.com/rollup/rollup/pull/5812): feat: optimize the literal value of unary expressions (@TrickyPi)
- [#5816](https://github.com/rollup/rollup/pull/5816): fix(deps): update swc monorepo (major) (@renovate[bot], @lukastaegert)
- [#5817](https://github.com/rollup/rollup/pull/5817): fix(deps): lock file maintenance minor/patch updates (@renovate[bot], @lukastaegert)
- [#5818](https://github.com/rollup/rollup/pull/5818): support for changing the attributes key for dynamic imports (@TrickyPi)
- [#5819](https://github.com/rollup/rollup/pull/5819): Return UnknownValue if getLiteralValueAtPath is called recursively within logical expressions (@TrickyPi)
- [#5820](https://github.com/rollup/rollup/pull/5820): return null (@kingma-sbw)

v4.32.1 (2025-01-28)

## 4.32.1

_2025-01-28_

### Bug Fixes

- Fix possible crash when optimizing logical expressions (#5804)

### Pull Requests

- [#5804](https://github.com/rollup/rollup/pull/5804): fix: set hasDeoptimizedCache to true as early as possible (@TrickyPi)
- [#5813](https://github.com/rollup/rollup/pull/5813): Fix typo (@kantuni)

v4.32.0 (2025-01-24)

## 4.32.0

_2025-01-24_

### Features

- Add watch.onInvalidate option to trigger actions immediately when a file is changed (#5799)

### Bug Fixes

- Fix incorrect urls in CLI warnings (#5809)

### Pull Requests

- [#5799](https://github.com/rollup/rollup/pull/5799): Feature/watch on invalidate (@drebrez, @lukastaegert)
- [#5808](https://github.com/rollup/rollup/pull/5808): chore(deps): update dependency vite to v6.0.9 [security] (@renovate[bot])
- [#5809](https://github.com/rollup/rollup/pull/5809): fix: avoid duplicate rollupjs.org prefix (@GauBen, @lukastaegert)
- [#5810](https://github.com/rollup/rollup/pull/5810): chore(deps): update dependency @shikijs/vitepress-twoslash to v2 (@renovate[bot])
- [#5811](https://github.com/rollup/rollup/pull/5811): fix(deps): lock file maintenance minor/patch updates (@renovate[bot])

v4.31.0 (2025-01-19)

## 4.31.0

_2025-01-19_

### Features

- Do not immediately quit when trying to use watch mode from within non-TTY environments (#5803)

### Bug Fixes

- Handle files with more than one UTF-8 BOM header (#5806)

### Pull Requests

- [#5792](https://github.com/rollup/rollup/pull/5792): fix(deps): update rust crate swc_compiler_base to v8 (@renovate[bot])
- [#5793](https://github.com/rollup/rollup/pull/5793): fix(deps): lock file maintenance minor/patch updates (@renovate[bot])
- [#5794](https://github.com/rollup/rollup/pull/5794): chore(deps): lock file maintenance (@renovate[bot])
- [#5801](https://github.com/rollup/rollup/pull/5801): chore(deps): update dependency eslint-config-prettier to v10 (@renovate[bot])
- [#5802](https://github.com/rollup/rollup/pull/5802): fix(deps): lock file maintenance minor/patch updates (@renovate[bot])
- [#5803](https://github.com/rollup/rollup/pull/5803): Support watch mode in yarn, gradle and containers (@lukastaegert)
- [#5806](https://github.com/rollup/rollup/pull/5806): fix: strip all BOMs (@TrickyPi)

v4.30.1 (2025-01-07)

## 4.30.1

_2025-01-07_

### Bug Fixes

- Prevent invalid code when simplifying unary expressions in switch cases (#5786)

### Pull Requests

- [#5786](https://github.com/rollup/rollup/pull/5786): fix: consider that literals cannot following switch case. (@TrickyPi)

v4.30.0 (2025-01-06)

## 4.30.0

_2025-01-06_

### Features

- Inline values of resolvable unary expressions for improved tree-shaking (#5775)

### Pull Requests

- [#5775](https://github.com/rollup/rollup/pull/5775): feat: enhance the treehshaking for unary expression (@TrickyPi)
- [#5783](https://github.com/rollup/rollup/pull/5783): Improve CI caching for node_modules (@lukastaegert)

v4.29.2 (2025-01-05)

## 4.29.2

_2025-01-05_

### Bug Fixes

- Keep import attributes when using dynamic ESM `import()` expressions from CommonJS (#5781)

### Pull Requests

- [#5772](https://github.com/rollup/rollup/pull/5772): Improve caching on CI (@lukastaegert)
- [#5773](https://github.com/rollup/rollup/pull/5773): fix(deps): lock file maintenance minor/patch updates (@renovate[bot])
- [#5780](https://github.com/rollup/rollup/pull/5780): feat: use picocolors instead of colorette (@re-taro)
- [#5781](https://github.com/rollup/rollup/pull/5781): fix: keep import attributes for cjs format (@TrickyPi)

v4.29.1 (2024-12-21)

## 4.29.1

_2024-12-21_

### Bug Fixes

- Fix crash from deoptimized logical expressions (#5771)

### Pull Requests

- [#5769](https://github.com/rollup/rollup/pull/5769): Remove unnecessary lifetimes (@lukastaegert)
- [#5771](https://github.com/rollup/rollup/pull/5771): fix: do not optimize the literal value if the cache is deoptimized (@TrickyPi)

v4.29.0 (2024-12-20)

## 4.29.0

_2024-12-20_

### Features

- Treat objects as truthy and always check second argument to better simplify logical expressions (#5763)

### Pull Requests

- [#5759](https://github.com/rollup/rollup/pull/5759): docs: add utf-8 encoding to JSON file reading (@chouchouji)
- [#5760](https://github.com/rollup/rollup/pull/5760): fix(deps): lock file maintenance minor/patch updates (@renovate[bot])
- [#5763](https://github.com/rollup/rollup/pull/5763): fix: introduce UnknownFalsyValue for enhancing if statement tree-shaking (@TrickyPi)
- [#5766](https://github.com/rollup/rollup/pull/5766): chore(deps): update dependency @rollup/plugin-node-resolve to v16 (@renovate[bot])
- [#5767](https://github.com/rollup/rollup/pull/5767): fix(deps): lock file maintenance minor/patch updates (@renovate[bot])

v4.28.1 (2024-12-06)

## 4.28.1

_2024-12-06_

### Bug Fixes

- Support running Rollup natively on LoongArch (#5749)
- Add optional `debugId` to `SourceMap` types (#5751)

### Pull Requests

- [#5749](https://github.com/rollup/rollup/pull/5749): feat: add support for LoongArch (@darkyzhou)
- [#5751](https://github.com/rollup/rollup/pull/5751): feat: Add `debugId` to `SourceMap` types (@timfish, @lukastaegert)
- [#5752](https://github.com/rollup/rollup/pull/5752): chore(deps): update dependency mocha to v11 (@renovate[bot])
- [#5753](https://github.com/rollup/rollup/pull/5753): chore(deps): update dependency vite to v6 (@renovate[bot])
- [#5754](https://github.com/rollup/rollup/pull/5754): fix(deps): update swc monorepo (major) (@renovate[bot])
- [#5755](https://github.com/rollup/rollup/pull/5755): chore(deps): lock file maintenance minor/patch updates (@renovate[bot])
- [#5756](https://github.com/rollup/rollup/pull/5756): Test if saving the Cargo cache can speed up FreeBSD (@lukastaegert)

v4.28.0 (2024-11-30)

## 4.28.0

_2024-11-30_

### Features

- Allow to specify how to handle import attributes when transpiling Rollup config files (#5743)

### Pull Requests

- [#5743](https://github.com/rollup/rollup/pull/5743): fix: supports modify the import attributes key in the config file (@TrickyPi, @lukastaegert)
- [#5747](https://github.com/rollup/rollup/pull/5747): chore(deps): update codecov/codecov-action action to v5 (@renovate[bot])
- [#5748](https://github.com/rollup/rollup/pull/5748): chore(deps): lock file maintenance minor/patch updates (@renovate[bot])

v4.27.4 (2024-11-23)

## 4.27.4

_2024-11-23_

### Bug Fixes

- Update bundled magic-string to support sourcemap debug ids (#5740)

### Pull Requests

- [#5740](https://github.com/rollup/rollup/pull/5740): chore(deps): lock file maintenance minor/patch updates (@renovate[bot])

v4.27.3 (2024-11-18)

## 4.27.3

_2024-11-18_

### Bug Fixes

- Revert object property tree-shaking for now (#5736)

### Pull Requests

- [#5736](https://github.com/rollup/rollup/pull/5736): Revert object tree-shaking until some issues have been resolved (@lukastaegert)

v4.27.2 (2024-11-15)

## 4.27.2

_2024-11-15_

### Bug Fixes

- Ensure unused variables in patterns are always deconflicted if rendered (#5728)

### Pull Requests

- [#5728](https://github.com/rollup/rollup/pull/5728): Fix more variable deconflicting issues (@lukastaegert)

v4.27.1 (2024-11-15)

## 4.27.1

_2024-11-15_

### Bug Fixes

- Fix some situations where parameter declarations could put Rollup into an infinite loop (#5727)

### Pull Requests

- [#5727](https://github.com/rollup/rollup/pull/5727): Debug out-of-memory issues with Rollup v4.27.0 (@lukastaegert)