Home > front end >  Use a specific version of Vue for a Quasar project
Use a specific version of Vue for a Quasar project

Time:04-26

When I started a new Vue project with Quasar, it installed the latest version of Vue which is 3.2.33, however I want to use 3.2.30.
How can I roll back or change it to that version of Vue?

CodePudding user response:

You can fix a specific version to be used via the following in your package.json

{
  "dependencies": {
    "vue": "3.2.30"
  },
}

Regarding the Quasar CLI, it creates a project with the following by default
enter image description here

Regarding semver, since it's ^3.0.0, the range will be >=3.0.0 and <4.0.0.
So every news project built by Quasar will be using the stable MAJOR v3 and the latest MINOR PATCH versions.

You cannot change that properly.
(you could of course hack it yourself by keeping your own frozen version of Quasar or risk to edit it in your yarn.lock but I heavily recommend against that)

At the end, the project may use something lately released by the Vue core team or a critical fix. If the dev team of Quasar requires this change but you hacked it, you may experience some weird bugs that you will have no idea of the source (on top of other possible conflicts/issues).


TLDR: use the latest version of Vue (as intended by the Quasar team) or maybe lock a specific version of quasar that is fitting your needs regarding the Vue version.
You will not risk anything doing that.

PS: Quasar ^1.0.0 is used for Vue2 apps. If you want to see if some specific versions of Quasar are running some specific frozen versions of Vue, you can always dig deep into the releases of the project.

  • Related