Move @electron/rebuild into optionalDependencies
- Dominant language
- TypeScript
- Stars
- 7.1k
- Forks
- 641
- Avg merge
- 3d 1h
- Merged PRs (30d)
- 30
Description
### Pre-flight checklist
- [x] I have read the [contribution documentation](https://github.com/electron/forge/blob/main/CONTRIBUTING.md) for this project.
- [x] I agree to follow the [code of conduct](https://github.com/electron/electron/blob/main/CODE_OF_CONDUCT.md) that this project uses.
- [x] I have searched the issue tracker for a feature request that matches the one I want to file, without success.
### Problem description
Many firms disallow installation of node-gyp. This module is dragged in through @electron/rebuild, thus preventing @electron/forge from being installed without hacky workarounds.
I believe this problem can be solved by moving @electron/rebuild into optionalDependencies. Only a small percentage of electron projects require native module building, and those projects almost by definition won't have restrictions on node-gyp. Anyone else will be able to install the library without getting stuck at this point.
### Proposed solution
Move @electron/rebuild into optionalDependencies.
### Alternatives considered
To get around this problem, we've been using a resolution that points node-gyp to a fake library. But this requires some manual hand-holding with our customers.
### Additional information
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.