sveltekit-electron
sveltekit-electron copied to clipboard
Adapter Node
Is there a way to use @sveltejs/adapter-node ? It seems to works for dev but as soon as i build the app i only get a blank window.
Hey- I haven't tried this yet. Did you manage to get it working?
Do you have a code example to show the error? I would be willing to take a look at the issue.
I have the same issue, the resulting app is empty. Is this project still in development ?
Yep! PRs are welcome, wasn't able to get this working in my brief testing before @itssumitrai
I'm also running into this problem. Has anyone found a solution to this yet?
There are solutions but they aren't worth the trouble IMO - what is your use case? @JBloss1517
I was hoping to use the Sveltekit load function (or the new page endpoints) to get my data ahead of the page rendering, and was thinking that was going to require adapter-node to make work.
You should still be able to use a load function iirc - I will take a look tomorrow if there is a way we can make it more easy to expose the node adapter
Awesome! Thank you
Hey, I started to take a look and have a few ideas - I am away till friday so will finish up saturday!
That's so awesome of you, thank you!
Hey just wanted to check in on this? I have a use case for the node adapter especially with recent sveltekit updates
I started work on an adapter and forgot to finish it! let me see if I can get any further with it this week - and will put what I got online regardless
Was there a result/solution for this?
Hey, How use +server.js? this not working
I tried working on this, but it wouldn't let me install adapter-node. Instead, I just created a sample SvelteKit project using adapter-node and published it. If anyone wants to use it, the link is: https://github.com/navsubrm/svelte-electron-node-adapter/blob/master/index.cjs.
I haven't tested the build on windows, but it builds and runs fine on Mac. It should work with any imported SvelteKit app.
@ghostdevv, did you ever push the changes you made? I am curious how you solved using the node adapter.
Works in win10 ;)
any updates ?
I tried working on this, but it wouldn't let me install adapter-node. Instead, I just created a sample SvelteKit project using adapter-node and published it. If anyone wants to use it, the link is: https://github.com/navsubrm/svelte-electron-node-adapter/blob/master/index.cjs.
I haven't tested the build on windows, but it builds and runs fine on Mac. It should work with any imported SvelteKit app.
@ibilux I'm using this and building packaging for Mac/Windows and it's working for me - electron/sveltekit with nodejs(sveltekit).
A few issues I had during working with it.. I have to run npm run dev:svelte/electron separately.
On build I have to make sure that sveltekit is not part of the app.asar
- couldn't seem to get it to work if it was packaged etc..
I haven't tested the build on windows, but it builds and runs fine on Mac. It should work with any imported SvelteKit app.
I'm trying to use it right now. It's a clever idea. I'll work with it I may can do something with the packaging.
If you can figure out the packaging let me know - I wasted a day trying different things to get it to work - and ended up just leaving the build dir unpackaged wiith the config - using nsis for the package manager
"files": [
"app/**/*",
"build/**/*",
"index.cjs",
"package.json",
"preload.cjs"
],
"asarUnpack": [
"build/**/*",
"node_modules/**/*"
]
Also forgot to mention I'm using electron-builder for packaging -
npx electron-builder build --windows
npx electron-builder build --mac