Warning! Beta Stage
The Quasar SSG Mode is currently in the “beta” stage. Based on the community feedback, the API may change in the future, so check the release notes each time you upgrade “@quasar/app-vite”.
Developing
quasar dev -m ssg
# ..or the longer form:
quasar dev --mode ssgThe development server renders normal SSG routes through the SSR pipeline. Routes matched by ssg.clientSideRenderingRoutes are rendered on the client. The /src-ssg/ssg-renderer file is used only during a production build, so the development server does not write static HTML files.
Building for Production
quasar build -m ssg
# ..or the longer form:
quasar build --mode ssgThe default output directory is dist/ssg. The build fails if getSsgPages() returns no pages or if two page definitions try to write the same file.
TIP
Should you want to change the default error handling behaviour of the SSG render process (fail on first error), and instead you want to go through all SSG pages then error out, or just warn but not fail, or ignore the errors completely, you can use the quasar.config > ssg > onSsgRendererError.
If you want a production build with debugging enabled:
quasar build -m ssg -d
# ..or the longer form
quasar build -m ssg --debug