How to import ipcRenderer in vue.js ? __dirname is not defined

Updated Answer – Nodeintegration disabled and contextIsolation enabled In order to use the ipcRenderer with Vue CLI plugin Electron Builder you need to first setup electron to utilize a preload.js file. Inside your vue.config.js file you need to add the preload.js path like this: // vue.config.js – project root module.exports = { pluginOptions: { electronBuilder: … Read more