You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: packages/@vue/cli-plugin-pwa/README.md
+7-1Lines changed: 7 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,6 +2,12 @@
2
2
3
3
> pwa plugin for vue-cli
4
4
5
+
The service worker added with this plugin is only enabled in the production environment (e.g. only if you run `npm run build` or `yarn build`). Enabling service worker in a development mode is not a recommended practice, because it can lead to the situation when previously cached assets are used and the latest local changes are not included.
6
+
7
+
Instead, in the development mode the `noopServiceWorker.js` is included. This service worker file is effectively a 'no-op' that will reset any previous service worker registered for the same host:port combination.
8
+
9
+
If you need to test a service worker locally, build the application and run a simple HTTP-server from your build directory. It's recommended to use a browser incognito window to avoid complications with your browser cache.
10
+
5
11
## Configuration
6
12
7
13
Configuration is handled via the `pwa` property of either the `vue.config.js`
@@ -54,7 +60,7 @@ file, or the `"vue"` field in `package.json`.
54
60
- Default: `'default'`
55
61
56
62
-**pwa.assetsVersion**
57
-
63
+
58
64
- Default: `''`
59
65
60
66
This option is used if you need to add a version to your icons and manifest, against browser’s cache. This will append `?v=<pwa.assetsVersion>` to the URLs of the icons and manifest.
0 commit comments