Short tutorial setting up a blank but working Electron app with Svelte.
There are some project templates for exactly this purpose out there. Each ...
For further actions, you may consider blocking this person and/or reporting abuse
I had one issue setting it up on Windows. Had to change 2 things...
Change the npm script:
And trim() the incoming process.env.NODE_ENV
Very well done article though, thank you!
Thanks @personthing !
Changed the post to use cross-env as more folks were running into this!
Very nice article and i managed to set it up working but there are a few errors you should fix:
npm install npm-run-all
autobuild
todev
in the electron-dev scriptHi Johannes,
First, thank you for this article, it allows to get a very compact app compared to other examples I found.
I'd like to make a windows app with saving capability in order to keep its state (kanban like app). I managed to use electron-store with vue in a first try but then I discovered svelte which is a lot more easy to learn.
Unfortunately, I am part of the guys that no not know fully understand electron, node.js,... and I am not able to set up electron-store with svelte. I tried to reference it as I did with vue by simply calling it with "require". "require" is not defined / accessible with svelte template.
Any advice ? Can you help ?
Thank you
This was so helpful, thank you Johannes!
Has anyone gotten the Electron frontend import of electron working in Svelte? I'd like to use ipcRenderer in my Svelte frontend to kick off a Node process in the Electron main script, but I get errors for the 'fs' and 'path' imports that Electron uses whenever I try.
Update: I found this StackOverflow discussion super helpful: stackoverflow.com/a/59888788. The solution isn't anything dependent on Svelte's behavior, but using the preload functionality within Electron.
Thanks @schweikertkevin , i fixed all 3 errors!
Also in the meantime the svelte rollup default has changed to put the bundle files under public/build which broke the auto-reload...
I adapted the article to that as well! Things moving fast...
This is extremely helpful, thank you so much for putting it together!
WOW. Svelte + Electron + Live Reload = AWESOME DEVELOPMENT EXPERIENCE!