title: Why routes are not added $router.addRoutes?
body: <p>Why routes are not added $ router.addRoutes?
  I tried everything I can not</p>
  
  <pre><code>async loadMenu() {
          try{
              let res = await this.$http.get('/menu')
              this.menuItems = res.data
              res.data.forEach((e) =&gt; {
                  this.$router.addRoutes([
                      {
                          path: /${e.url},
                          name: ${e.name},
                          component: require(`${e.compURL}`)
                      },
                  ])
                  console.log(e)
              })
          }catch(err){
              console.log(err)
          }
      },
  </code></pre>
  
  <p>I can not understand why not add dynamic routes?
  xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx</p>
  
  <pre><code>const router = new Router({
      routes: [
          {
              path: '/',
              name: 'home',
              component: Home,
              meta: {
                  title: 'EHZ',
                  layout: 'default-layout',
                  catId: 1
              }
          },
      ],
      mode: 'history',
      // base: locale,
  })
  
  router.beforeEach((to, from, next) =&gt; {
      if (to.meta.requiresAuth) { 
  
              Vue.axios.post('/auth/token')
                  .then((res) =&gt; {
                      if ( res.status === 200 )
                          next()
                  })
                  .catch((e) =&gt; {
                      store.dispatch('logout')
                      next({ path: '/auth/login'})
                  })
      }
      else {
          next()
      }
  })
  
  export default router;
  </code></pre>
  
  <p>I added the code from the router.js. 
  Something else needs to be shown?</p>
  
  <hr>
  
  <p>I added a picture that I get in <strong>res.data</strong></p>
  
  <p><a href="https://i.stack.imgur.com/asdLT.jpg" rel="nofollow noreferrer">image res.data</a></p>