mirror of
https://github.com/vuejs/vue-cli.git
synced 2026-03-05 14:00:17 -06:00
docs: instructions about history pushstate in netlify (#2422) [ci skip]
* Instructions about History Pushstate in Netlify Included instructions for users that use `History Pushstate mode` on Vue Router and run application on Netlify. * Update docs/guide/deployment.md Co-Authored-By: hmaesta <hmaesta@gmail.com>
This commit is contained in:
committed by
Haoqun Jiang
parent
2ab93e7970
commit
fbc25fcaf6
@@ -133,6 +133,15 @@ Commit both the `.gitlab-ci.yml` and `vue.config.js` files before pushing to you
|
||||
|
||||
Also checkout [vue-cli-plugin-netlify-lambda](https://github.com/netlify/vue-cli-plugin-netlify-lambda).
|
||||
|
||||
In order to receive direct hits using `history mode` on Vue Router, you need to create a file called `_redirects` under `/public` with the following content:
|
||||
|
||||
```
|
||||
# Netlify settings for single-page application
|
||||
/* /index.html 200
|
||||
```
|
||||
|
||||
More information on [Netlify redirects documentation](https://www.netlify.com/docs/redirects/#history-pushstate-and-single-page-apps).
|
||||
|
||||
### Amazon S3
|
||||
|
||||
See [vue-cli-plugin-s3-deploy](https://github.com/multiplegeorges/vue-cli-plugin-s3-deploy).
|
||||
|
||||
Reference in New Issue
Block a user