How do we add worker thread in Electron JS? I have tried below which works fine in dev mode.
const worker = new Worker(path.join(__dirname, 'worker.js'));
But this causes error when the app is packaged, it is looking for worker.js inside app.asar. Even with the worker.js included in build/files.