electron-vite-react
electron-vite-react copied to clipboard
渲染进程使用node模块报错
Describe the bug
Error: Dynamic require of "fs" is not supported
v2.1.0用的vite4没有问题
使用main分支用到了vite5, 没法直接使用node模块
在渲染进程,不允许直接使用node提供的底层方法,你可以在主进程写函数,然后通过ipcRender通信传给渲染进程使用