# What changed in @electron/rebuild

> 11 changes in @electron/rebuild 4 from its official release notes, upgrade guides and advisories: 4 breaking, 3 new APIs and options. Each one cited. Sources checked 2026-10-24. HTML: https://unstale.sh/npm/@electron/rebuild/

To see which of these apply to a repository, run `npx @unstale/cli init` in it.

## @electron/rebuild 4

### Breaking changes

- The package's default export has been removed. (4.0.0) — [release notes](https://github.com/electron/rebuild/releases/tag/v4.0.0)
- The package is now ESM-only, so consumers must use ESM rather than CommonJS. (4.0.0) — [release notes](https://github.com/electron/rebuild/releases/tag/v4.0.0)
- The required Node.js version is now >=22.12.0. (4.0.0) — [release notes](https://github.com/electron/rebuild/releases/tag/v4.0.0)
- The unused nodeGypPath field has been removed from Rebuilder. (4.0.0) — [release notes](https://github.com/electron/rebuild/releases/tag/v4.0.0)

### New APIs and options

- Adds a jobs option to control node-gyp parallel compilation. (4.2.0) — [release notes](https://github.com/electron/rebuild/releases/tag/v4.2.0)
- The dist URL can now be set via the ELECTRON_REBUILD_DIST_URL environment variable. (4.1.0) — [release notes](https://github.com/electron/rebuild/releases/tag/v4.1.0)
- Adds the --platform CLI argument. (4.0.5) — [release notes](https://github.com/electron/rebuild/releases/tag/v4.0.5)

### Performance

- The production dependency tree was minimized, reducing the dependencies included for production use. (4.0.4) — [release notes](https://github.com/electron/rebuild/releases/tag/v4.0.4)

### Fixes and other changes

- The rebuild marker now includes the target platform. (4.2.1) — [release notes](https://github.com/electron/rebuild/releases/tag/v4.2.1)
- An explicitly empty --prebuild-tag-prefix is now honored. (4.0.6) — [release notes](https://github.com/electron/rebuild/releases/tag/v4.0.6)
- Scoped modules now work with onlyModules and the --only CLI option. (4.0.2) — [release notes](https://github.com/electron/rebuild/releases/tag/v4.0.2)
