11import type { ForgeConfig } from "@electron-forge/shared-types" ;
2- import path from "path" ;
32import fs from "fs-extra" ;
3+ import path from "path" ;
44
5- function moveModule ( moduleList : string [ ] , resourcePath : string ) {
5+ function copyModule ( moduleList : string [ ] , resourcePath : string ) {
66 moduleList . forEach ( ( module ) => {
7- fs . moveSync (
7+ fs . copySync (
88 path . join ( "./node_modules" , module ) ,
9- path . join ( resourcePath , "app/node_modules" , module )
9+ path . join ( resourcePath , "app/node_modules" , module ) ,
1010 ) ;
1111 } ) ;
1212}
@@ -27,11 +27,11 @@ const config: ForgeConfig = {
2727 // We need electron-serve to exist inside the electron build's node_modules.
2828 // All other modules from nextjs are not needed and can be removed.
2929 if ( platform === "win32" ) {
30- moveModule ( electronModules , path . join ( extractPath , "resources" ) ) ;
30+ copyModule ( electronModules , path . join ( extractPath , "resources" ) ) ;
3131 } else if ( platform === "darwin" ) {
32- moveModule (
32+ copyModule (
3333 electronModules ,
34- path . join ( extractPath , "pulse-editor.app/Contents/Resources" )
34+ path . join ( extractPath , "pulse-editor.app/Contents/Resources" ) ,
3535 ) ;
3636 } else if ( platform === "linux" ) {
3737 }
@@ -47,7 +47,7 @@ const config: ForgeConfig = {
4747 options : {
4848 icon : path . join (
4949 __dirname ,
50- "../shared-assets/icons/electron/pulse_logo_round"
50+ "../shared-assets/icons/electron/pulse_logo_round" ,
5151 ) ,
5252 } ,
5353 } ,
0 commit comments