electron+vue环境运行下出现__dirname is not defined报错解决方法

在根目录vue.config.js文件中,添加以下代码

module.exports = {
    pluginOptions: {
        electronBuilder: {
            nodeIntegration: true
        }
    }
}

 

posted on 2021-08-10 17:07  写最骚的代码  阅读(4799)  评论(0编辑  收藏  举报