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

22 messages · Page 1 of 1 (latest)

low bramble
#

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

🏕 Opinionated Vite + SolidJS Starter Template. Contribute to xbmlz/vitesse-solid development by creating an account on GitHub.

zealous shell
#

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

low bramble
zealous shell
#

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

low bramble
#

Alright thanks. Would you reccommend or discourage trying to use streaming SSR in this context?

zealous shell
#

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

#

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

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...

▶ Play video
low bramble
#

Thank you very much for your advice

low bramble
#

@zealous shell 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

zealous shell
#

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 - #solidstart message

low bramble
#

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.

zealous shell
#

and be quite easy to adopt solid start alter on if desired