P
P
Polina Titova2020-01-02 16:02:52
Vue.js
Polina Titova, 2020-01-02 16:02:52

How to translate vue 3 code to vue 4?

I am doing a project on the lesson on Vue.js version 4.5.9, in the video version 3.5.5. When writing one block of code, the program stops working, although it does not give any errors. The block itself looks like this:

import Vue from 'vue'
import App from './App.vue'
import router from './router'

Vue.config.productionTip = false

new Vue({
  router,
  render: h => h(App),
}).$mount('#app')


How can this be fixed? Either install Vue.js 3.5.5 or translate the code, but how?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexey, 2020-01-02
@poly-titova

Read the changes and make the appropriate edits https://cli.vuejs.org/migrating-from-v3/
To install a specific version, write it simply through the dog npm install -g [email protected], probably the old one will need to be deleted first, but here I xs

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question