Skip to content

Updated netlify docs for vue/cli-plugin-pwa #5847

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 1 commit into from
Sep 28, 2020
Merged
Changes from all 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
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