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:
- Packages in
/src-ssr/package.json > dependenciesare runtime dependencies. Quasar adds them to the generated/dist/ssr/package.json, and they must be installed when deploying the build. - Packages in
devDependencies, such as@types/*, are build-time dependencies and are not added to the generated package.
Only runtime dependencies are carried into the generated package manifest, keeping production installation focused on what the server needs.
Installing SSR specific packages, like the actual webserver & middlewares & plugins:
# run in /src-ssr for runtime dependencies:
pnpm add <deps>
# run in /src-ssr for deps used by the build system (if any)
pnpm add -D <dev-deps>