Skip to content

Commit 89774a2

Browse files
committed
chore: Merge branch 'master' into dev
2 parents 8177753 + 3eaef4d commit 89774a2

File tree

2 files changed

+20
-4
lines changed

2 files changed

+20
-4
lines changed

docs/guide/cli-service.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ npx vue-cli-service help [command]
126126

127127
## Skipping Plugins
128128

129-
Sometimes, you may want to not use a certain CLI Plugin when running a command. For example you might want to build a version of your app that doesn't include the PWA plugin. You can do that by passing the name of the plugin to the `--skip-plugins` option.
129+
You can exclude specific plugins when running a command by passing the name of the plugin to the `--skip-plugins` option:
130130

131131
```bash
132132
npx vue-cli-service build --skip-plugins pwa

docs/guide/deployment.md

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -169,15 +169,31 @@ Commit both the `.gitlab-ci.yml` and `vue.config.js` files before pushing to you
169169
170170
Also checkout [vue-cli-plugin-netlify-lambda](https://github.com/netlify/vue-cli-plugin-netlify-lambda).
171171
172-
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:
172+
#### Use history mode on Vue Router
173+
174+
In order to receive direct hits using `history mode` on Vue Router, you need to redirect all trafic to the `/index.html` file.
175+
176+
> More information on [Netlify redirects documentation](https://docs.netlify.com/routing/redirects/rewrites-proxies/#history-pushstate-and-single-page-apps).
177+
178+
##### Recomended method
179+
180+
Create a file called `netlify.toml` in the root of your repository with the following content:
181+
182+
```toml
183+
[[redirects]]
184+
from = "/*"
185+
to = "/index.html"
186+
status = 200
187+
```
188+
189+
##### Alternative method
190+
Create a file called `_redirects` under `/public` with the following content:
173191
174192
```
175193
# Netlify settings for single-page application
176194
/* /index.html 200
177195
```
178196
179-
More information on [Netlify redirects documentation](https://www.netlify.com/docs/redirects/#history-pushstate-and-single-page-apps).
180-
181197
If you are using [@vue/cli-plugin-pwa](https://cli.vuejs.org/core-plugins/pwa.html#vue-cli-plugin-pwa) make sure to exclude the `_redirects` file from being cached by the service worker.
182198
To do so, add the following to your `vue.config.js`:
183199
```javascript

0 commit comments

Comments
 (0)