Quasar & Quasar CLI v0.17 aka SSR - Developer Preview


  • Admin

    CLI beta.18 has been released. Enhancements and new features. PWA devs will be thrilled by this update as service-worker and manifest.json are now served during development too!


  • Admin

    CLI beta.19 & beta.20 has been released. Fixes and new features: Quasar Meta plugin; new preFetch params (currentRoute & redirect); preFetch() for App.vue too.


  • Admin

    The last beta (beta.21) has been released. New features:

    1. SSR error page when developing and server encounters an error
    2. SSR - dev & prod common code through src-ssr/extension.js


  • Hello. Just trying a new build created with Beta.21.
    I did:

    1. npm i -g quasar-cli@next
    2. quasar init ~~~~
    3. run through the process, I had to npm i quasar-cli inside the project as well, as this was still on v0.16
    4. quasar dev -m ssr -t ios

    Then it says:

    Dev mode.......... ssr
     Quasar theme...... ios
     Quasar CLI........ v0.17.0-beta.21
     Quasar Framework.. v0.17.0-beta.15
    

    Question 1:

    Is it normal that Quasar Framework beta and CLI beta is a different version?

    Question 2:

    With the new method of instantiating the vuex Store, it exports a function instead of the actual store. I used to import the store into several places of my app (js helper files etc.) and use it, however, how would I do this with the SSR version?

    Question 3:

    After building the app with quasar build -m ssr -t ios it didn’t seem to give me a folder that was compatible with static-site host services like Netlify. With Next I just need to do Nuxt generate and it gives me a public folder with an index.ssr.html and I can just drag that folder in Netlify and it’s hosted.

    How to best do this with Quasar? The ssr folder in dist has index.js and template.html. Which is my main endpoint?



  • To answer my own Question 3:
    Quasar SSR only gives actual SSR not a pre-rendered site. Since you can do Nuxt generate and then upload a prerendered site to a static-website host, I thought this must have also been possible with Quasar as well. But this is not the case!

    After everything cools down with v0.17 SSR, I’d love a pre-render build method for Quasar! : D as I realised, I need pre-rendered sites for my Netlify host!



  • @rstoenescu when the v0.17 will be released? just estimated expectations.



  • @Mohammed the work in finalizing v17 is on full speed and will be be soon, once everything is done and the documentation is up to date.

    would expect it next week or the one after that at most.

    cheers max


  • Admin

    Released beta.22. At this point we’re ready to roll unless some major issue is detected on this beta.
    Cool additions: QTable as grid; Many perf enhancements. Documentation is almost ready too.



  • I may have missed a step. I have meta data for open graph and curl returns the html with the data empty, but when loaded in a browser the data gets populated. Which implies Javascript is running on the client to complete the rendering.

    The app is getting data from firebase in the created() cycle. I can try putting it somewhere else



  • Also, when I make changes to the code the result is always this error. I have to kill the server and restart it

    Firebase: Firebase App named ‘[DEFAULT]’ already exists (app/duplicate-app).



  • this app/duplciate-app didn’t occur in the previous version



  • @rstoenescu I’d love to try out my other apps in the beta build, but wondering about the store:

    With the new method of instantiating the vuex Store, it exports a function instead of the actual store. I used to import the store into several places of my app (js helper files etc.) and use it, however, how would I do this with the SSR version?



  • @mesqueeb
    Question 1: Yes, they differ. Only Major version should stay the same…
    Question 2: I had a problem with that, too. You need to convert it to usage of Quasar plugins - store is injected in them. Once you create store, you can also name-export it, too… But I would try to avoid that, because you would need to do lot of null-checking.



  • @panstromek
    It’s usually these plugin files that become so long in my case, I extract parts into other JS files, import them on the top of the plugin file.

    One solution is to change ALL these imports to functions, and pass the store as param. But not really beautiful imo…

    Do you have any other advice for me?



  • I think this is what is needed for prefetching data. There is much room for improvement here. Going to have to look at Quasar source to see if it can handle this https://ssr.vuejs.org/guide/data.html#data-store


  • Admin


  • Admin

    @mesqueeb

    Question 1 --> perfectly normal. Quasar Framework is the core, and the CLI is the toolbox, so separate versions.
    Question 2 --> read this as a starting point, to understand why you need a factory function for Vuex store: https://github.com/quasarframework/quasar-framework.org/blob/dev/source/guide/ssr-writing-universal-code.md
    Question 3 --> https://github.com/quasarframework/quasar-framework.org/blob/dev/source/guide/ssr-deploying.md


  • Admin

    Final edit: The official v0.17 has been released! Thanks to all contributors and everyone who helped in testing the betas! You rock!


Log in to reply