electron-vite / vite-plugin-electron

:electron: Electron⚡️Vite core repo
https://github.com/electron-vite
MIT License
691 stars 56 forks source link

How to share code with web app? #245

Open vincenzoml opened 5 months ago

vincenzoml commented 5 months ago

I want to be able to serve my sveltekit/vite app both from a web server and from electron. I've scaffolded my project using electron-vite, so my fronted sources are in src/renderer. How to serve them using vite dev? I get an empty page if I serve it from the repository root, and if I change the vite root to src/renderer, then imports don't work since there's no package.json and node_modules there.

yejimeiming commented 2 months ago

Is anyone willing to pay a fee for this?

rafaellehmkuhl commented 1 month ago

We are doing this with our Vue app. Maybe there's something there that can help you.