S
SolidJS11mo ago
Minoo

SolidStart or Vite + solid-pwa plugin for creating a fast and secure PWA app?

I want to create a PWA app using Solid. I am not decided on if I want to use CSR or SSR but I'm leaning towards SSR. But should I choose SolidStart or Vite with a solid-pwa or a startup template for vite and solid like this: https://github.com/xbmlz/vitesse-solid that has the pwa plugin. Also when developing the PWA can I use google workbox or is that something else?
GitHub
GitHub - xbmlz/vitesse-solid: 🏕 Opinionated Vite + SolidJS Starter ...
🏕 Opinionated Vite + SolidJS Starter Template. Contribute to xbmlz/vitesse-solid development by creating an account on GitHub.
10 Replies
Birk Skyum
Birk Skyum11mo ago
You'll quite likely be better off with SolidStart for SSR There really isn't an SSR story for Solid without it And if you change your mind and want CSR, you can set the ssr: false down the line so it's the more flexible option
Minoo
MinooOP11mo ago
Okay thanks, and that will work well for developing a PWA?
Birk Skyum
Birk Skyum11mo ago
I have previously made PWA's as CSR without solid-start, where I used these two: import solidPlugin from "vite-plugin-solid"; import { VitePWA } from 'vite-plugin-pwa' But if you want SSR it'll be necessary to use solid start. I'm in a migration towards solid-start myself, so I haven't tried the PWA plugin yet with it, but will quite soon trying now
Minoo
MinooOP11mo ago
Alright thanks. Would you reccommend or discourage trying to use streaming SSR in this context?
Birk Skyum
Birk Skyum11mo ago
CSR is the norm for PWAs still, so it's the more stable and proven approach I have a bit of work to do getting my app up to speed with the latest version of solid start etc. (i'm apparently the old "solid-start": "^0.3.8" in this app), to test this out properly before I can report back Also, my app doesn't appear to be SSR compatible, because I use the global window quite heavily which only exist on the client, and some browser dimensions for mobile/desktop layouts that I can also only know at the client
Birk Skyum
Birk Skyum11mo ago
I'm quite sure we can make solid-start work with PWA for CSR. There is also the different approach which is to use solid with i.e. Tauri like this instead of solid-start https://www.youtube.com/watch?v=W539_PP4Y98
Atila
YouTube
Tauri and Solid make mobile and desktop apps
Tauri v2 is almost stable, combining Tauri and Solid we can now ship native apps in MacOS, Windows, Linux, Android, and iOS. One codebase! Plus, all together at once with Hot Module Replacement 🤯 Chapters: ======== 00:00 - Tauri v2 00:30 - What's Quantum ? 01:00 - Create a new project from Quantum 01:45 - Initialize iOS development setup 02:08...
Minoo
MinooOP11mo ago
Thank you very much for your advice @Birk Skyum did you have any success in using PWA in solid-start, bunch of issues in local development for me in terms of the browser recognizing the website as a PWA
Birk Skyum
Birk Skyum11mo ago
it's not working for me right now with the latest version of solid start. It's not being recognized as a PWA same as you experience the way solid start use vite plugins is a bit in the works and will likely change in the next versions there's some ongoing debate in here - https://discord.com/channels/722131463138705510/910635844119982080/1209609143271428096 soon the new version of solid start will come out with vite 5 (https://github.com/solidjs/solid-start/pull/1331) then i'll try some more.
Minoo
MinooOP11mo ago
Okay, If I go for using Solid with just Vite and use the vite pwa plugin, are there important benefits of a metaframework that I will lose (and if so, how could those be replaced if using vite with solid). I am developing a CSR SPA app that won't require that many pages but will have login and do requests to an API.
Birk Skyum
Birk Skyum11mo ago
that would work absolutely fine for a client side routed app. and be quite easy to adopt solid start alter on if desired
Want results from more Discord servers?
Add your server