I’m writing an experimental app in electron and I’m using webpack as my build tool.
Everything works fine (the build runs correctly in electron and so on), the only issue I’m currently facing is with webpack-dev-server , specifically webpack-dev-server.js which tries opening a websocket connection but can’t find the url (/sockjs-node).
My guess is the problem is caused by electron because (maybe) I didn’t enable websocket protocol (using the
protocol module), could that be the reason?
Feel free to point out that it’s a webpack issue, I’m not entirely sure of what I’m saying. I’m just looking for directions. Running the webpage in normal browser works with webpack-dev-server.js though. So my guess is that I’m dealing with something that it’s strictly connected to electron.
I’m still debugging the issue. One important note, I’m not running on
file protocol, I’m running a registered protocol (named
mdm) which I registered. It behaves like
http, not like file protocol (didn’t add it to schemes), my feeling is that it’s trying to open a websocket using mdm:///sockjs-node instead of ws:// or http://
Anyone else managed to get webpack-dev-server working in electron and have some guidelines?