For electron applications, the problem that source api cannot be packaged when react is packaged

problem description

I integrated antd and react and added eletron.
use

in main.js

clipboard.png

urlloadWindow,,bs.

clipboard.png

The picture above shows me trying to call the notification api of the system (system). It is impossible to build at all when webpack is packaged

the environmental background of the problems and what methods you have tried

try http.post () and intercept the action to run the underlying api in node, but if server.listen (8080) is provided in electron"s main.js to run a http service, and both ends use http to interact, then why don"t I just use the browser.

what result do you expect? What is the error message actually seen?

you can call electron"s api in tsx with react+antd+electron without http and packaging won"t go wrong

Apr.09,2022
Menu