@vite-pwa/nuxt 0.0.3 → 0.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/module.json +1 -1
- package/dist/module.mjs +3 -3
- package/package.json +6 -2
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -13,14 +13,14 @@ function configurePWAOptions(options, nuxt) {
|
|
|
13
13
|
config = options.injectManifest;
|
|
14
14
|
} else {
|
|
15
15
|
options.workbox = options.workbox ?? {};
|
|
16
|
-
if (options.registerType === "autoUpdate" && (options.injectRegister === "script" || options.injectRegister === "inline")) {
|
|
16
|
+
if (options.registerType === "autoUpdate" && (options.client?.registerPlugin || options.injectRegister === "script" || options.injectRegister === "inline")) {
|
|
17
17
|
options.workbox.clientsClaim = true;
|
|
18
18
|
options.workbox.skipWaiting = true;
|
|
19
19
|
}
|
|
20
20
|
if (nuxt.options.dev) {
|
|
21
|
-
options.workbox.navigateFallback = nuxt.options.app.baseURL ?? "/";
|
|
21
|
+
options.workbox.navigateFallback = options.workbox.navigateFallback ?? nuxt.options.app.baseURL ?? "/";
|
|
22
22
|
if (options.devOptions?.enabled && !options.devOptions.navigateFallbackAllowlist)
|
|
23
|
-
options.devOptions.navigateFallbackAllowlist = [new RegExp(nuxt.options.app.baseURL)
|
|
23
|
+
options.devOptions.navigateFallbackAllowlist = [nuxt.options.app.baseURL ? new RegExp(nuxt.options.app.baseURL) : /\//];
|
|
24
24
|
}
|
|
25
25
|
config = options.workbox;
|
|
26
26
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vite-pwa/nuxt",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.4",
|
|
5
5
|
"packageManager": "pnpm@7.26.1",
|
|
6
6
|
"description": "Zero-config PWA for Nuxt 3",
|
|
7
7
|
"author": "antfu <anthonyfu117@hotmail.com>",
|
|
@@ -39,7 +39,10 @@
|
|
|
39
39
|
"dev:generate": "nuxt generate playground",
|
|
40
40
|
"dev:build": "nuxi build playground",
|
|
41
41
|
"dev:prepare": "nuxt-module-build --stub && nuxi prepare playground",
|
|
42
|
-
"
|
|
42
|
+
"dev:preview": "npm run dev:build && node playground/.output/server/index.mjs",
|
|
43
|
+
"dev:preview:generate": "npm run dev:generate && npx serve playground/dist",
|
|
44
|
+
"prepublishOnly": "npm run prepack",
|
|
45
|
+
"release": "bumpp && npm publish",
|
|
43
46
|
"lint": "eslint .",
|
|
44
47
|
"lint-fix": "nr lint --fix"
|
|
45
48
|
},
|
|
@@ -56,6 +59,7 @@
|
|
|
56
59
|
"@nuxt/module-builder": "^0.2.1",
|
|
57
60
|
"@nuxt/schema": "^3.1.1",
|
|
58
61
|
"@nuxt/test-utils": "^3.1.1",
|
|
62
|
+
"bumpp": "^8.2.1",
|
|
59
63
|
"changelogen": "^0.4.1",
|
|
60
64
|
"eslint": "^8.32.0",
|
|
61
65
|
"nuxt": "^3.1.1",
|