Quasar CLI with Vite - @quasar/app-vite v3
Notice the /src-ssr/package.json file in your generated /src-ssr folder. The purpose of it is for you to be able to install packages used by the SSR mode directly under this folder (and not pollute the common /src).
{
"name": "quasar-ssr-app-hono",
"version": "1.0.0",
"description": "Quasar SSR server folder",
"type": "module",
"private": true,
"dependencies": {
"hono": "^4.12.12",
"@hono/node-server": "^2.0.0"
}
}WARNING
If you import anything from node_modules in /src-ssr, then be aware that:
- The packages specified in /src-ssr/package.json >
dependenciesare runtime deps and will get embedded into your production dist/ - The packages specified in
devDependenciesare considered build system deps, like@types/*and they will NOT get embedded into dist/.
Only the dependencies will be embedded into your dist/, to ensure it’s as small as possible and no time is lost installing unnecessary deps.
Installing SSR specific packages, like the actual webserver & middlewares & plugins:
# run in /src-ssr for runtime deps (will be embedded into /dist):
pnpm add <deps>
# run in /src-ssr for deps used by the build system (if any)
pnpm add -D <dev-deps>