fix(electron): disable runAsNode fuse (#13406)

fix AF-2781




#### PR Dependency Tree


* **PR #13406** 👈

This tree was auto-generated by
[Charcoal](https://github.com/danerwilliams/charcoal)

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **Chores**
* Updated Electron app configuration to include an additional plugin for
enhanced packaging options.
* Added a new development dependency to support the updated
configuration.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
Peng Xiao
2025-08-04 21:38:12 +08:00
committed by GitHub
parent 0fcb4cb0fe
commit d2a73b6d4e
3 changed files with 54 additions and 2 deletions

View File

@@ -3,7 +3,9 @@ import { rm, symlink } from 'node:fs/promises';
import path from 'node:path';
import { fileURLToPath } from 'node:url';
import { FuseV1Options, FuseVersion } from '@electron/fuses';
import { utils } from '@electron-forge/core';
import { FusesPlugin } from '@electron-forge/plugin-fuses';
import {
appIdMap,
@@ -202,7 +204,13 @@ export default {
},
},
makers,
plugins: [{ name: '@electron-forge/plugin-auto-unpack-natives', config: {} }],
plugins: [
{ name: '@electron-forge/plugin-auto-unpack-natives', config: {} },
new FusesPlugin({
version: FuseVersion.V1,
[FuseV1Options.RunAsNode]: false,
}),
],
hooks: {
readPackageJson: async (_, packageJson) => {
// we want different package name for canary build