|
1 | | -import type { ForgeConfig } from '@electron-forge/shared-types'; |
2 | | -import { MakerSquirrel } from '@electron-forge/maker-squirrel'; |
3 | | -import { MakerZIP } from '@electron-forge/maker-zip'; |
4 | 1 | import { MakerDeb } from '@electron-forge/maker-deb'; |
5 | 2 | import { MakerRpm } from '@electron-forge/maker-rpm'; |
6 | | -import { VitePlugin } from '@electron-forge/plugin-vite'; |
| 3 | +import { MakerSquirrel } from '@electron-forge/maker-squirrel'; |
| 4 | +import { MakerZIP } from '@electron-forge/maker-zip'; |
7 | 5 | import { FusesPlugin } from '@electron-forge/plugin-fuses'; |
| 6 | +import { VitePlugin } from '@electron-forge/plugin-vite'; |
| 7 | +import type { ForgeConfig } from '@electron-forge/shared-types'; |
8 | 8 | import { FuseV1Options, FuseVersion } from '@electron/fuses'; |
9 | 9 |
|
10 | 10 | const config: ForgeConfig = { |
11 | | - packagerConfig: { |
12 | | - asar: true, |
13 | | - executableName: 'vrc_hyperrate_v2' |
14 | | - }, |
15 | | - rebuildConfig: {}, |
16 | | - makers: [new MakerSquirrel({}), new MakerZIP({}, ['darwin']), new MakerRpm({}), new MakerDeb({})], |
17 | | - plugins: [ |
18 | | - new VitePlugin({ |
19 | | - // `build` can specify multiple entry builds, which can be Main process, Preload scripts, Worker process, etc. |
20 | | - // If you are familiar with Vite configuration, it will look really familiar. |
21 | | - build: [ |
22 | | - { |
23 | | - // `entry` is just an alias for `build.lib.entry` in the corresponding file of `config`. |
24 | | - entry: 'src/main.ts', |
25 | | - config: 'vite.main.config.ts', |
26 | | - }, |
27 | | - { |
28 | | - entry: 'src/preload.ts', |
29 | | - config: 'vite.preload.config.ts', |
30 | | - }, |
31 | | - ], |
32 | | - renderer: [ |
| 11 | + packagerConfig: { |
| 12 | + asar: true, |
| 13 | + executableName: 'vrc_hyperrate_v2' |
| 14 | + }, |
| 15 | + rebuildConfig: {}, |
| 16 | + makers: [ |
| 17 | + new MakerSquirrel({}), |
| 18 | + new MakerZIP({}, ['darwin']), |
| 19 | + new MakerRpm({}), |
| 20 | + new MakerDeb({}) |
| 21 | + ], |
| 22 | + plugins: [ |
| 23 | + new VitePlugin({ |
| 24 | + // `build` can specify multiple entry builds, which can be Main process, Preload scripts, Worker process, etc. |
| 25 | + // If you are familiar with Vite configuration, it will look really familiar. |
| 26 | + build: [ |
| 27 | + { |
| 28 | + // `entry` is just an alias for `build.lib.entry` in the corresponding file of `config`. |
| 29 | + entry: 'src/main.ts', |
| 30 | + config: 'vite.main.config.ts' |
| 31 | + }, |
| 32 | + { |
| 33 | + entry: 'src/preload.ts', |
| 34 | + config: 'vite.preload.config.ts' |
| 35 | + } |
| 36 | + ], |
| 37 | + renderer: [ |
| 38 | + { |
| 39 | + name: 'main_window', |
| 40 | + config: 'vite.renderer.config.ts' |
| 41 | + } |
| 42 | + ] |
| 43 | + }), |
| 44 | + // Fuses are used to enable/disable various Electron functionality |
| 45 | + // at package time, before code signing the application |
| 46 | + new FusesPlugin({ |
| 47 | + version: FuseVersion.V1, |
| 48 | + [FuseV1Options.RunAsNode]: false, |
| 49 | + [FuseV1Options.EnableCookieEncryption]: true, |
| 50 | + [FuseV1Options.EnableNodeOptionsEnvironmentVariable]: false, |
| 51 | + [FuseV1Options.EnableNodeCliInspectArguments]: false, |
| 52 | + [FuseV1Options.EnableEmbeddedAsarIntegrityValidation]: true, |
| 53 | + [FuseV1Options.OnlyLoadAppFromAsar]: true |
| 54 | + }) |
| 55 | + ], |
| 56 | + publishers: [ |
33 | 57 | { |
34 | | - name: 'main_window', |
35 | | - config: 'vite.renderer.config.ts', |
36 | | - }, |
37 | | - ], |
38 | | - }), |
39 | | - // Fuses are used to enable/disable various Electron functionality |
40 | | - // at package time, before code signing the application |
41 | | - new FusesPlugin({ |
42 | | - version: FuseVersion.V1, |
43 | | - [FuseV1Options.RunAsNode]: false, |
44 | | - [FuseV1Options.EnableCookieEncryption]: true, |
45 | | - [FuseV1Options.EnableNodeOptionsEnvironmentVariable]: false, |
46 | | - [FuseV1Options.EnableNodeCliInspectArguments]: false, |
47 | | - [FuseV1Options.EnableEmbeddedAsarIntegrityValidation]: true, |
48 | | - [FuseV1Options.OnlyLoadAppFromAsar]: true, |
49 | | - }), |
50 | | - ], |
51 | | - publishers: [ |
52 | | - { |
53 | | - name: '@electron-forge/publisher-github', |
54 | | - config: { |
55 | | - repository: { |
56 | | - owner: 'KotRikD', |
57 | | - name: 'vrc_hyperate_chatbox' |
58 | | - }, |
59 | | - prerelease: true |
60 | | - } |
61 | | - } |
62 | | - ] |
| 58 | + name: '@electron-forge/publisher-github', |
| 59 | + config: { |
| 60 | + repository: { |
| 61 | + owner: 'KotRikD', |
| 62 | + name: 'vrc_hyperate_chatbox' |
| 63 | + }, |
| 64 | + prerelease: true |
| 65 | + } |
| 66 | + } |
| 67 | + ] |
63 | 68 | }; |
64 | 69 |
|
65 | 70 | export default config; |
0 commit comments