Deploying w/vue-cli3 to 404 error on callback



New to vue and am using vue-cli3 to scaffold a simple authentication app for auth0, 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";


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 ( == "callback") {
  } else if ($auth.isAuthenticated()) {
    // if authenticated allow access
  } else {
    // trigger auth0 login if not been authenticated before.
    // refers to the root Vue instance the router was injected into$auth.login();

export default router;

I am expecting when auth0 does callback to 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 doesn’t require any special measures. I have googled and scoured this site but find nothing that solves my problem. Any help much appreciated.