开发模式下的电子空白页
当我的电子应用程序启动时,我只看到一个空白页面。 奇怪的是,代码没有改变。现在,即使切换回旧的提交,也会出现问题。没有错误消息。既不在主线程上,也不在渲染器线程上。
首先,我认为这与我的新 m1max MacBook Pro 有关。但我在英特尔 MacBook Pro 上测试了之前在英特尔 Mac mini 上运行的项目,也只得到了一个空白页。
奇怪的是,当应用程序打包时,它按预期工作。仅在开发模式下才会出现空白页。 开发模式使用webpack-dev-server
。
app.html
已加载,我还看到一些代码已执行。处理一些 redux 内容的组件的容器也被称为。组件本身的render
函数不会被调用。不确定发生了什么……
由于没有错误消息,因此很难脚踏实地。 有人可以给我一些指导来追踪问题吗?
When my electron app starts, I only see a blank page.
The weird thing is, that the code haven't changed. Now, even when switching back to an old commit, the problem occurs. There are no error messages. Neither on the main thread nor on the renderer thread.
In the first place, I thought it is related to my new m1max MacBook Pro. But I tested the project, that was previously running on an Intel Mac mini, on an Intel MacBook Pro and also got only a blank page.
The strange thing is, that it is working as expected when the app is packaged. The blank page only occurs, when in dev mode.
Dev mode is using webpack-dev-server
.
The app.html
is loaded and I also see some code is executed. The container for the component handling some redux stuff is also called. The render
function of the component itself, is not called. Not sure, what is happening ...
As there is no error message, it's very hard to get feet on the grounds.
Can someone give me some guidance to track the issue down?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论