Can't make it work with SolidJS-Start as it doesn't produce `index.html`
Description
Not sure if bug or a feature request. But I have a Wails repo setup here:
https://github.com/learn-anything/learn-anything/tree/main/app
My front end is built from https://github.com/solidjs/solid-start
I modified wails.json to run my pnpm run .. commands: https://github.com/learn-anything/learn-anything/blob/main/app/wails.json
I assume the issue is that with Wails-React setup, I need an index.html file like in here. That supposedly should call a file similar to this but for SolidJS. The thing is that Solid-Start uses Vite for bundling. And my output dir (called netlify) doesn't give me any .html files. 😿
Not sure how to go about solving this.
To Reproduce
- Clone https://github.com/learn-anything/learn-anything
-
cd app -
wails dev
See this:
Expected behaviour
It works similar to other Svelte/React templates.
System Details
wails doctor
Wails CLI v2.0.0-beta.37
Scanning system - Please wait (this may take a long time)...Done.
System
------
OS: MacOS
Version: 12.4
ID: 199506
Go Version: go1.19beta1
Platform: darwin
Architecture: arm64
Wails
------
Version: v2.0.0-beta.37
Dependency Package Name Status Version
---------- ------------ ------ -------
xcode command line tools N/A Installed 2395
npm N/A Installed 8.5.5
*upx N/A Available
*nsis N/A Available
* - Optional Dependency
Diagnosis
---------
Your system is ready for Wails development!
Optional package(s) installation details:
- upx : Available at https://upx.github.io/
- nsis : Available at https://nsis.sourceforge.io/Download
Thanks for opening this. All of the standard wails templates also use vite so I'd recommend as a first step to create the react or react-ts projects and look at how they interact with vite. I'm not familiar at all with solid so can't offer more than that right now but let us know how you get on and we will help in any way we can 🙏
@nikitavoloboev Hey wassup, I saw your repo. I am not sure if doing SSR like that would make sense https://github.com/learn-anything/learn-anything/blob/main/app/frontend/src/entry-server.tsx
As It looks like solid server is made to run on Node JS. That being said, I will spend some time and create a solid js starter that might help with this.
@nikitavoloboev Easy peasy got it working. I didn't go with Solid start instead just cloned their TS template directly from https://github.com/solidjs/templates
After I finished creating the Wails template, it all worked without any problems. One thing to note is I didn't use that solid starter is because all of them had some sort of server dependency like Node, Netlify, Deno etc and TBH didn't make sense to me to use Netlify for building a desktop native app?
Anyways If I am missing something feel free to ping me and I will try to help, for now will publish this template.
Done.
https://github.com/sidwebworks/wails-solid-template
This is super cool @sidwebworks
My issue is a bit more complex though because I want to make my web app work for both situations, running in browser (SSR + SolidJS) and also running on desktop (no SSR).
Your template only covers the second case. I asked @nksaraf for help and he said he'll try get example with this soon.
Ahh what you just mentioned made the most sense lol.
Yeah I got what you mean, I am already in their discord, will check it out.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Any luck on running SolidJS in-browser with wails? I'm also looking to solve that particular issue - wasn't sure if you guys tackled it already.
Solved it using https://github.com/sidwebworks/wails-solid-template template