Skip to content
New issue

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 #6

Closed
liuyike98 opened this issue Oct 2, 2022 · 3 comments
Closed

从渲染进程调用ipcRenderer #6

liuyike98 opened this issue Oct 2, 2022 · 3 comments

Comments

@liuyike98
Copy link

image
image

从渲染进程import ipcRenderer就无法启动工程和编译工程, 之前的插件我记得有一个选项, 这个插件没有导出可配置的选项吗

@liuyike98
Copy link
Author

换成require可以, 但是觉得很奇怪, 是需要怎么修改吗

@liuyike98
Copy link
Author

我通过引入你的之前plugin里面的renderer暂时解决这个问题
image
但是还是想明白新插件应该怎么使用

@caoxiemeihao
Copy link
Owner

caoxiemeihao commented Oct 2, 2022

新插件只构建 Electron-Main
Electron-Renderer 还是需要额外处理才能使用 import ipcRenderer


用 vite-plugin-electron-renderer 是正确的方式

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants