You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm sorry for replying so late. Can you provide an example of using it as a minimum? I haven't tried using it before, so I don't know how to meet your needs. Thank you.
// Use Vite multi-entryexportdefault{plugins: [electron({entry: {// Main-Process entry file of the Electron App.main: 'electron/main.ts'test: 'electron/test.js',},}),],}
electron/main.ts
// Main processconst{ port1, port2 }=newMessageChannelMain()constchild=utilityProcess.fork(path.join(__dirname,'test.js'))child.stdout.on('data',(data)=>{console.log(`Received chunk ${data}`)})
// Use Vite multi-entryexportdefault{plugins: [electron({entry: {// Main-Process entry file of the Electron App.main: 'electron/main.ts'test: 'electron/test.js',},}),],}
electron/main.ts
// Main processconst{ port1, port2 }=newMessageChannelMain()constchild=utilityProcess.fork(path.join(__dirname,'test.js'))child.stdout.on('data',(data)=>{console.log(`Received chunk ${data}`)})
I'm trying to use the utility process for some background jobs but having trouble getting it to work using the example.
How do I tell vite config to include another file that will be used to spawn the utility process?
The text was updated successfully, but these errors were encountered: