-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathforge.config.js
51 lines (50 loc) · 1.31 KB
/
forge.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
const fs = require("fs");
const path = require("path");
const glob = require("glob");
module.exports = {
hooks: {
// github.com/electron/packager/issues/1444#issuecomment-1690130930
packageAfterPrune(_, buildPath) {
if (process.platform !== "darwin") return;
const dirs = glob.sync(
path.join(buildPath, "node_modules/**/node_gyp_bins"),
{ onlyDirectories: true }
);
for (const directory of dirs) {
fs.rmdirSync(directory, { recursive: true, force: true });
}
},
},
packagerConfig: {
asar: true,
},
rebuildConfig: {},
makers: [
{
name: "@electron-forge/maker-squirrel",
config: {},
},
{
name: "@electron-forge/maker-zip",
platforms: ["darwin", "linux", "win32"],
},
{
name: "@electron-forge/maker-deb",
config: {},
},
{
name: "@electron-forge/maker-rpm",
config: {},
},
{
name: "@electron-forge/maker-dmg",
platforms: ["darwin"]
}
],
plugins: [
{
name: "@electron-forge/plugin-auto-unpack-natives",
config: {},
},
],
};