title: Vue router alias priority
body: <p>I have two routes that I have set up in my routes file like this:</p>
  
  <pre><code>{
      path: '/:language?/chain/:entity/',
      alias: '/:language?/:entity/',
      name: 'search',
      component: Search
  }
  </code></pre>
  
  <p>Because the <code>path</code> route is more specific than the alias I have put it as my main <code>path</code>.</p>
  
  <p>This works for something like:</p>
  
  <p><code>/de/chain/mcdonalds/</code></p>
  
  <p>However for something like this it doesn't work:</p>
  
  <p><code>/de/mcdonalds/</code></p>
  
  <p>Because my main path is <code>/:language?/chain/:entity/</code> it will still insert <code>chain</code> into all my <code>router-link</code> components. Even though it does not match the exact word.</p>
  
  <p>I want that route to take precedence if it matches though. If I swap them around I will inverse my entire situation.</p>
  
  <p>How can I get both of these routes to work properly?</p>