Skip to content

Commit

Permalink
bugfix with router base path
Browse files Browse the repository at this point in the history
  • Loading branch information
justijndepover committed Oct 16, 2020
1 parent 6cb5c1c commit 2b5d52b
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 3 deletions.
8 changes: 7 additions & 1 deletion public/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -20002,9 +20002,15 @@ __webpack_require__.r(__webpack_exports__);


vue__WEBPACK_IMPORTED_MODULE_0___default.a.use(vue_router__WEBPACK_IMPORTED_MODULE_1__["default"]);
var path = 'inbox';

if (document.head.querySelector('meta[name="base-path"]')) {
path = document.head.querySelector('meta[name="base-path"]').content;
}

/* harmony default export */ __webpack_exports__["default"] = (new vue_router__WEBPACK_IMPORTED_MODULE_1__["default"]({
mode: "history",
base: "/inbox",
base: "/" + path,
routes: [{
path: "/:id",
name: "mail",
Expand Down
2 changes: 1 addition & 1 deletion public/mix-manifest.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"/app.js": "/app.js?id=0541ce64a901b6434c51",
"/app.js": "/app.js?id=2bebb6bd5d2aac74e43a",
"/app.css": "/app.css?id=6ef9fb9e910c36af7c6e"
}
8 changes: 7 additions & 1 deletion resources/js/router/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,15 @@ import Router from "vue-router"

Vue.use(Router);

var path = 'inbox';

if (document.head.querySelector('meta[name="base-path"]')) {
path = document.head.querySelector('meta[name="base-path"]').content;
}

export default new Router({
mode: "history",
base: "/inbox",
base: "/" + path,
routes: [
{
path: "/:id",
Expand Down
1 change: 1 addition & 0 deletions resources/views/index.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="base-path" content="{{ config('inbox.path') }}">
{{-- <link rel="shortcut icon" href="{{ asset('/vendor/horizon/img/favicon.png') }}"> --}}

<title>Inbox{{ config('app.name') ? ' - ' . config('app.name') : '' }}</title>
Expand Down

0 comments on commit 2b5d52b

Please sign in to comment.