8000 :pencil: docs: Set base property of VueRouter when deploying to gh-pages by anselal · Pull Request #5117 · vuejs/vue-cli · GitHub
[go: up one dir, main page]

Skip to content

📝 docs: Set base property of VueRouter when deploying to gh-pages #5117

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Feb 7, 2020
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions docs/guide/deployment.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,16 @@ If you are using the PWA plugin, your app must be served over HTTPS so that [Ser
: '/'
}
```

Also if you are using vue-router you want to override the base property like:

``` js
const router = new VueRouter({
...,
base: '/my-project/',
...,
})
```

2. Inside your project, create `deploy.sh` with the following content (with highlighted lines uncommented appropriately) and run it to deploy:

Expand Down
0