Deploying w/vue-cli3 to surge.sh 404 error on callback

vue-router
vue-cli
webpack

#1

New to vue and am using vue-cli3 to scaffold a simple authentication app for auth0, auth0-plugin.surge.sh. My router.js module is:

import Vue from "vue";
import Router from "vue-router";
import Home from "./views/Home.vue";
import Callback from "./views/Callback.vue";

Vue.use(Router);

const router = new Router({
  mode: "history",
  routes: [
    {
      path: "/",
      name: "home",
      component: Home
    },
    {
      path: "/callback",
      name: "callback",
      component: Callback
    }
  ]
});

// very basic "setup" of a global guard
router.beforeEach((to, from, next) => {
  // check if "to"-route is "callback" and allow access
  if (to.name == "callback") {
    next();
  } else if (router.app.$auth.isAuthenticated()) {
    // if authenticated allow access
    next();
  } else {
    // trigger auth0 login if not been authenticated before.
    // router.app refers to the root Vue instance the router was injected into
    router.app.$auth.login();
  }
});

export default router;

I am expecting when auth0 does callback to auth-plugin.surge.sh/callback I should get redirected to Callback component via vue-router. Instead I am getting a 404 error for the /callback page.
The webpack dev server works as expected. The same error is occurring when using the serve npm package. Reading the Deployment documnet it makes it seem very straightforward that deploying to surge.sh doesn’t require any special measures. I have googled and scoured this site but find nothing that solves my problem. Any help much appreciated.