Upgrade to Vue 3
Refs #649
There are still some issues with the upgrade to Vue 3 that are not solved in this draft. Some of them can be solved independently of the upgrade:
- [x] vue-router 4 (part of Vue 3) does not support routes to other origins. We should probably use simple
a hreflinks instead ofrouter-linkfor those. - [ ] Vuelidate 2 (new version compatible with Vue 2 and Vue 3) adds nested validators that should be used instead of the now unsupported
$each. - [ ]
npx depcheckreturns many other unused dependencies. Can they be removed safely?
The other issues need to be fixed in this draft:
- [ ] The new copy to clipboard implementation is untested.
- [ ] The style is broken, probably because there are a lot of eslint errors that cannot be fixed automatically.
I don't exactly understand how vue-demi should be used. If there are problems, use npx vue-demi-switch 2 or npx vue-demi-switch 3 depending on the version you currently want to use. Clearing node_modules can also help.
I .eslintignore everything, because npm run serve refuses to run otherwise. This should be removed if needed.
The commit chore(webapp): update to vue 3 was made by changing .eslintrc.js and running this in www/webapp:
npm remove --save vue-template-compiler vuetify-loader vue-cli-plugin-vuetify
npm install --save vue@3 vuetify@3 vue-router@4 webpack-plugin-vuetify @vue/compiler-sfc
npm install --save-dev vue-demi eslint-plugin-vuetify
npx vue-demi-switch 3
./node_modules/.bin/eslint --fix 'src/**'
Nice work 👍
I would recommend to migrate Vuelidate in a separate PR before upgrading vue.
@lukaslihotzki Thanks for the work! Are you still in for moving it on? :)