All files / src/router index.ts

0% Statements 0/7
100% Branches 0/0
0% Functions 0/1
0% Lines 0/7

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26                                                   
import Vue from "vue";
import VueRouter from "vue-router";
 
import routes from "./routes";
 
Vue.use(VueRouter);
 
/*
 * If not building with SSR mode, you can
 * directly export the Router instantiation
 */
 
export default function(/* { store, ssrContext } */) {
  const Router = new VueRouter({
    // scrollBehavior: () => ({ y: 0 }),
    routes,
    // Leave these as is and change from quasar.conf.js instead!
    // quasar.conf.js -> build -> vueRouterMode
    // quasar.conf.js -> build -> publicPath
    mode: process.env.VUE_ROUTER_MODE,
    base: process.env.VUE_ROUTER_BASE
  });
 
  return Router;
}