title: VueJS router in hash mode: route to error page if file not found
body: <p>I'm having issues with the VueJS Router in hash-mode.</p>
  
  <p>This is what the router config looks like: </p>
  
  <pre><code>{
      mode: 'hash',
      base: process.env.BASE_URL,
      routes: [
          {
              path: '/',
              name: 'game',
              component: () =&gt; import(/* webpackChunkName: 'game-page' */ '@/app/views/GamePage.vue'),
              meta: { title: 'Game', },
          },
          {
              path: '*',
              name: '404',
              component: () =&gt; import(/* webpackChunkName: '404-page' */ '@/app/views/404Page.vue'),
          },
      ],
  }
  </code></pre>
  
  <p>I need to use the hash-mode since I'm developing for Cordova, but now I run into the following:</p>
  
  <p>The * doesn't get matched when there is no # in the url.</p>
  
  <p>In some cases the <code>beforeEach</code> is still called so I can work things out myself. For example <code>http://localhost:8080/audio</code> triggers the <code>beforeEach</code> and I can manually check if window.location is correct.</p>
  
  <p>However, with an url like <code>http://localhost:8080/audio/some_nonexsisting_file.ogg</code> the router doesn't do anything (it doesn't call the <code>beforeEach</code>) and just shows a blank page.</p>
  
  <p>Is there a workaround for this?</p>