title: Vue.js router with Ruby on Rails routes
body: <p>I'm currently working on a application with a Ruby on Rails backend and Vue.js frontend. It's a single page application. I'm using the webpacker gem to build my main JS file.</p>
  <p>I've added vue-router and and a couple frontend routes. I'm able to navigate using <code>&lt;router-link&gt;</code> which correctly renders the appropriate component. What I can't figure out is how do I setup my frontend routes so that someone can directly navigate to a URL without hitting my Rails routes.</p>
  <p>For example if I type <code>/sample-route</code> I'd like to hit my Vue.js route and not my Rails route. I still want to be able to make API calls to my Rails routes as well. For example <code>/api/users</code>.</p>