Quasar CLI with Vite - @quasar/app-vite v3
We’ll be using Quasar CLI to develop and build a SSR website. The difference between building a SPA, Mobile App, Electron App, PWA or SSR is simply determined by the “mode” parameter in “quasar dev” and “quasar build” commands.
In order to develop or build a SSR website, we first need to add the SSR mode to our Quasar project:
quasar mode add ssrIf you want to jump right in and start developing, you can skip the “quasar mode” command and issue:
quasar dev -m ssrThis will add SSR mode automatically, if it is missing.
After answering the question of what webserver you want to use (Hono/Express/Fastify/etc), a new folder will appear in your project folder (which is explained in detail on the Configuring SSR page):
src-ssr/
server-assets/
# copied as-is to dist
middlewares/
# SSR middleware files
render.js
# (or .ts) middleware to render pages with Vue
server.js
# (or .ts) SSR webserver
package.json
# helps install SSR only deps directly under /src-ssr