Coding With Fun
Home Docker Django Node.js Articles Python pip guide FAQ Policy

When to run vue invoke or vue upgrade?


Asked by Violeta Ayala on Dec 14, 2021 Vue.js 2.0



When running vue invoke / vue add / vue upgrade, there's now an extra confirmation step if you have uncommitted changes in the current repository. When running vue add vuex or vue add router: In v3, only vuex or vue-router will be added to the project;
Furthermore,
I was using the Vue version (2.5), I ran that command npm install -g @vue/cli after that I check my vue version by using the command vue --version and it shows me @vue/cli 4.1.2. but in my package.json file the version did not upgrade, it still showing me the older version i.e 2.5.7. You can upgrade it through vue cli.
Thereof, When running vue --version: When running vue invoke / vue add / vue upgrade, there's now an extra confirmation step if you have uncommitted changes in the current repository. When running vue add vuex or vue add router: In v3, only vuex or vue-router will be added to the project;
Besides,
Running the vue build command will prepare the project for deployment, and generate the resulting JavaScript files in the dist/ folder, so that it will be production-ready. All the warnings that Vue.js generates during development are removed, and the code is optimized for real-world usage.
Additionally,
Before: vue upgrade [patch | minor | major], and it does nothing more than installing the latest versions of Vue CLI plugins. After: vue upgrade [plugin-name]. Aside from upgrading the plugins, it can run migrators from plugins to help you automate the migration process.