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: docs/content/en/workbox.md
+6-4
Original file line number
Diff line number
Diff line change
@@ -38,13 +38,15 @@ pwa: {
38
38
39
39
(Boolean) Automatically register `/sw.js` on page load. Enabled by default.
40
40
41
-
### `dev`
41
+
### `enabled`
42
42
43
-
(Boolean) Enable workbox in dev mode of nuxt. (Disabled by default - Not recommended)
43
+
(Boolean) Enable workbox module. Workbox is **only enabled for production mode by default**.
44
44
45
-
**IMPORTANT NOTE:** Remember to clean application data and unregister service workers in your browser or you will experience infinity loop!
45
+
**IMPORTANT NOTES:**
46
46
47
-
It is recommended to test workbox using `nuxt build`/`nuxt start`. You can enable debug mode using `workbox.config.debug`.
47
+
- It is recommended to test workbox using `nuxt build`/`nuxt start`. You can enable debug mode using `workbox.config.debug` for production to debug.
48
+
- When setting `enabled` to `true`, remember to clean application data and unregister service workers in your browser when changing mode between dev or prod to avoid issues.
49
+
- When `enabled` is set to `false` (default for `nuxt dev`) workbox module registers a self-destroying worker and cleans `window.caches`. To completely disable module you can set `pwa.workbox: false` in `nuxt.config`.
0 commit comments