Open michaelto20 opened 2 months ago
cc @IEvangelist
There are so many variations of SPA flavors out there, and just as many opinions. I'd be curious, what was the configuration bits required and what value does another JS SPA example add? If the only delta is the config, I'm not so sure I'm sold. Perhaps, it could be added as another app within the existing example? /cc @DamianEdwards too
@IEvangelist, you are correct that the main changes are in the configs. Most of the config changes were in vite.config.ts
and default.config.template
. I think that adding this as another sample project is a good idea because pulling in environment variables into vite.config.ts
is different from the typical Vite usage (i.e., VITE_). It took me a few hours to figure this out, and I believe it would be valuable to save others from the same headache.
Additionally, while there are many flavors of SPAs, Vite seems to be picking up a lot of steam over the last two years and I wondered if this work would help with adopting Aspire by those wanting to use Vite.
With many new projects using Vite and Typescript with React, I struggled to find many examples or documentation on how to do that. I figured out the configuration and rewrote the weather sample app using Vite, Typescript, and React and would like to add that to the samples folder. Does this seem valuable and should I submit a PR for it?
Any chance you can make your repo public anyway?
@michaelto20 - sure, I'd review the React + Vite addition to the existing SPA sample. I might end up adding Svelte as well, I suppose the more we can demonstrate for well-adopted frameworks the better.
@NatanelBarazani I can't make the repo I was working on public as it is for my job but I've created a draft PR for review so @IEvangelist or @davidfowl if you'd like to review it and lend feedback I'd be happy to make any changes needed. Draft PR: #415
I just want to offer my Kudos. Having spent more than 2hrs looking for a solution. I managed to get my vite app working using your code here. +100 points. I hope your PR gets approved soon.
@kcadduk Thanks for the shout out!
With many new projects using Vite and Typescript with React, I struggled to find many examples or documentation on how to do that. I figured out the configuration and rewrote the weather sample app using Vite, Typescript, and React and would like to add that to the samples folder. Does this seem valuable and should I submit a PR for it?