Add router.basePath config option for deployments at non-webroot

This is in preparation of configuring Vue with publicPath: "".
This commit is contained in:
Linus Groh
2020-12-29 19:17:11 +01:00
parent 7db7837dfd
commit 045e635c21
3 changed files with 24 additions and 2 deletions
+3
View File
@@ -71,6 +71,9 @@ const DEFAULT_CONFIG = {
reloadHistory: false,
},
primaryColor: "#3f51b5",
router: {
basePath: "/",
},
selectedDevice: null,
selectedUser: null,
showDistanceTravelled: true,
+3 -2
View File
@@ -1,12 +1,13 @@
import Vue from "vue";
import Router from "vue-router";
import Map from "./views/Map.vue";
import config from "@/config";
import Map from "@/views/Map.vue";
Vue.use(Router);
export default new Router({
mode: "history",
base: process.env.BASE_URL,
base: config.router.basePath,
routes: [
{
path: "/",