8000 :pencil: docs: Set base property of VueRouter when deploying to gh-pa… · vuejs/vue-cli@661b3c1 · GitHub
[go: up one dir, main page]

Skip to content

Commit 661b3c1

Browse files
authored
📝 docs: Set base property of VueRouter when deploying to gh-pages (#5117)
* 📝 docs: Set base property of VueRouter when deploying to gh-pages When you use VueRouter and want to deploy to gh-pages (in a project) you have to set the base property of the VueRouter to the project's name * Fix small typo * Indent code
1 parent 4ee70f6 commit 661b3c1

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

docs/guide/deployment.md

Lines changed: 10 additions & 0 deletions 8000
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,16 @@ If you are using the PWA plugin, your app must be served over HTTPS so that [Ser
5050
: '/'
5151
}
5252
```
53+
54+
Also if you are using vue-router you want to override the base property like:
55+
56+
``` js
57+
const router = new VueRouter({
58+
...,
59+
base: '/my-project/',
60+
...,
61+
})
62+
```
5363

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

0 commit comments

Comments
 (0)
0