electron渲染进程发送消息给主进程报错__dirname is not undefined

"electron":"17.0.1",
"electron-updater":"4.6.5"

当进行自动更新渲染进程发送消息给主进程报错

__dirname is not undefined
解决方案

在根目录vue.config.js 添加如下代码

 pluginOptions: {
        electronBuilder: {
            nodeIntegration: true
            }
            }

你可能感兴趣的:(大前端,electron,vue.js,javascript)