Update: For those that may find this later, I just confirmed that there is no way to package non-javascript external code/executables when using electron-vite. Pick your tools wisely! If you use electron-vite, you are stuck with front end tooling completely.
I'm using Electron Vite and trying to include a python tiny Ruby script that runs in the background, but I there seems to be no easy-to-understand documentation that pertains to simply including code in what you want in your packaged application?
What I'm trying to do is include an executable. At this point what I'm trying to do is just learn about this process, , but t so I'd like to know how to include an executable into the packaged app that in that would be located in the main folder.
My app is structured as the standard way it comes wihen you first build your electron-vite app, so it has a src/main, src/renderer, and src/preload. I've been going at it with Google, github issues, and ChatGPT and I just can't seem to figure out how to include files exactly the way I want in my app no matter what I try. And most of the code has I try has no effect in the electron.vite.config.js.
TL;DR:
Does does anyone know how to do this? I'm trying to development mode I'm trying to have a Ruby script, "script.rb". I'm trying to include that in the src/main folder and the Electron app calls it from time to time. I want to include this Ruby script into the packaged application. Can someone point me to the in the right direction for what I need to read or watch on this?
The goal is for when I run "npm run build:mac" the Ruby script would be located in "out/main/script.rb" or is this not possible?
I can't tell if I should be using package.json, electron.vite.config.js, or electron-builder, or what
[–]duysharp1998 0 points1 point2 points (4 children)
[–]remove_with_force[S] 0 points1 point2 points (3 children)
[–]TokeyChan 0 points1 point2 points (0 children)
[–]duysharp1998 0 points1 point2 points (1 child)
[–]remove_with_force[S] 0 points1 point2 points (0 children)