title: How to add Router to @vue/cli app with vuejs 3?
body: <p>Learning vuejs3 I created new @vue/cli app with command</p>
  <pre><code>vue create myapp
  </code></pre>
  <p>with vuejs 3 selected
  I added Router to my project and added Router reference in my src/main.js :</p>
  <pre><code>import { createApp } from 'vue'
  
  import { createRouter/*, createWebHistory */ } from 'vue-router'
  import WelcomeScreen from './pages/WelcomeScreen.vue'
  import UsersList from './pages/UsersList.vue'
  
  import App from './App.vue'
  
  const router = createRouter({
    // history: createWebHistory(),
    mode: 'history',
    routes: [
      { path: '/', component: WelcomeScreen },
      { path: '/users', component: UsersList }
    ]
  })
  const app = createApp(App)
  app.use(router)
  
  app.mount('#app')
  </code></pre>
  <p>But In the console I see warning :</p>
  <pre><code>&quot;export 'createRouter' was not found in 'vue-router'
  </code></pre>
  <p>and error :</p>
  <pre><code>main.js?56d7:10 Uncaught TypeError: Object(...) is not a function
  </code></pre>
  <p>In my package.json I have :</p>
  <pre><code>  &quot;dependencies&quot;: {
      &quot;core-js&quot;: &quot;^3.6.5&quot;,
      &quot;mitt&quot;: &quot;^2.1.0&quot;,
      &quot;vue&quot;: &quot;^3.0.0&quot;,
      &quot;vue-router&quot;: &quot;^3.4.8&quot;
    },
  </code></pre>
  <p>and</p>
  <pre><code>$ vue --version
  @vue/cli 4.5.8
  </code></pre>
  <p>Which way is valid?
  Also are some some vuejs3 tutorials for @vue/cli?
  I found some vuejs 3 tutorials, but not for @vue/cli and that raise some confusion...</p>
  <p>Say in my @vue/cli with vue2 I use file src/router/index.js, but I do not remember if
  I have created manually...</p>
  <p>Thanks!</p>