TypeError: fs.existsSync is not a function
在渲染进程中使用remote模块出现上面错误,百度后发现,只要在require前面加上window就行,应该是他们把electron绑定在window对象上面了
const {BrowserWindow} = window.require(‘electron’).remote;
TypeError: fs.existsSync is not a function
在渲染进程中使用remote模块出现上面错误,百度后发现,只要在require前面加上window就行,应该是他们把electron绑定在window对象上面了
const {BrowserWindow} = window.require(‘electron’).remote;