How to use Quasar to build a Multi Page Application
-
As I learned the documentation, I know Quasar could do SPA. My question is can it be used for a multi page application, in this way, let the backend control the router.
-
I’m not sure to understand what you want to achieve, but you may have a look on SSR & vuejs (https://ssr.vuejs.org/). Unfortunately SSR support seems not ready yet for Quasar: https://github.com/quasarframework/quasar-template-ssr
-
@akaryatrh Yeah, I think your answer is what I mean. THX.
-
Maybe you can set up a reverse proxy serving single html pages from SPA on the backend. Well, that would be a wild configuration.
-
- Create a new project using @vue/cli (Vue3)
- Add as Quasar a plug in ( https://quasar.dev/start/vue-cli-plugin) - Enable Quasar tree-shaking (recommended)
- Configure Vue 3 to generate multiple pages using multi page mode https://cli.vuejs.org/config/#pages
- This will generate a separate HTML page that references generated tree-shaken JS files for each entry point.
-
@tohagan thanks for idea - this may be this specific use case, when one should prefer using vue-cli and quasar in plugin mode instead of quasar-cli alone. Maybe in the future it will be possible to build multiple html pages from quasar project also. It would open so many possibilities btw…