Quasar CLI with Vite - @quasar/app-vite v3
Quasar CLI selects the SSR build target through the mode argument passed to quasar dev and quasar build.
To develop or build an SSR website, first add SSR mode to the Quasar project:
quasar mode add ssr
# or, to skip the webserver prompt (useful for scripts/CI):
quasar mode add ssr --webserver hono # or fastify, express, koaIf 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. In a non-interactive environment (such as CI), where the webserver prompt cannot be answered, the Hono webserver is picked automatically.
After you choose Hono, Express, Fastify, or Koa as the webserver, a new folder appears in your project (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