Skip to content

Commit

Permalink
docs: update netlify docs for vue/cli-plugin-pwa (#5847) [skip ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
sarbikbetal authored Sep 28, 2020
1 parent 6681459 commit 145ccca
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion docs/guide/deployment.md
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ Typically, your static website will be hosted on https://yourUserName.gitlab.io/


```javascript
// vue.config.js file to be place in the root of your repository
// vue.config.js file to be placed in the root of your repository
module.exports = {
publicPath: process.env.NODE_ENV === 'production'
Expand Down Expand Up @@ -178,6 +178,21 @@ In order to receive direct hits using `history mode` on Vue Router, you need to
More information on [Netlify redirects documentation](https://www.netlify.com/docs/redirects/#history-pushstate-and-single-page-apps).
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.
To do so, add the following to your `vue.config.js`:
```javascript
// vue.config.js file to be placed in the root of your repository
module.exports = {
pwa: {
workboxOptions: {
exclude: [/_redirects/]
}
}
}
```
Checkout [workboxOptions](https://cli.vuejs.org/core-plugins/pwa.html#configuration) and [exclude](https://developers.google.com/web/tools/workbox/reference-docs/latest/module-workbox-webpack-plugin.InjectManifest#InjectManifest) for more.
### Render
[Render](https://render.com) offers [free static site hosting](https://render.com/docs/static-sites) with fully managed SSL, a global CDN and continuous auto deploys from GitHub.
Expand Down

0 comments on commit 145ccca

Please sign in to comment.