I'm creating a child process using "fork" in the "electron" app. I'm creating child process as below:
const child_process_file = path.join(__dirname, 'getSubFolders.js')
const sub = fork(child_process_file, [JSON.stringify(subFolderObj), JSON.stringify(arg)])
when I run this program in debug mode, the child process is working fine, but when I generate an exe file and run the exe file, child process is not working as it should be. It is targetting main.ts(main file) instead of a file('getSubFolders.js' here) passed in params while creating child process.
path generated for child_process_file is => C:\Users\Saurabh\AppData\Local\Programs\INSTALLED_EXE_PATH\resources\app.asar\two-way-sync\getSubFolders.js
can anyone suggest what am i doing wrong in this?