We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
渲染进程导入ipcRenderer会出错 @@
The text was updated successfully, but these errors were encountered:
因为我没打开nodeIntegration,官方不推荐这么做https://www.electronjs.org/docs/latest/tutorial/security#3-enable-context-isolation 。你可以在preload.ts中导入ipcRenderer再把接口暴露给渲染进程。
nodeIntegration
ipcRenderer
如果无所谓,只要写代码方便就行了,那可以把nodeIntegration打开:
// In the main process. const win = new BrowserWindow({ webPreferences: { nodeIntegration: true } })
Sorry, something went wrong.
打开也不行 好像因为vite的关系 我参考preload的例子 搞定了 感谢
No branches or pull requests
渲染进程导入ipcRenderer会出错 @@
The text was updated successfully, but these errors were encountered: