@vite-pwa/nuxt 0.2.0 → 0.2.2
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 +7 -3
- package/dist/runtime/plugins/pwa.client.d.ts +7 -2
- package/dist/runtime/plugins/pwa.client.mjs +2 -1
- package/dist/runtime/plugins/pwa.client.stub.d.ts +7 -2
- package/dist/runtime/plugins/pwa.client.stub.mjs +2 -1
- package/package.json +3 -3
- /package/dist/runtime/plugins/{types.d.ts → pwa.d.ts} +0 -0
- /package/dist/runtime/plugins/{types.mjs → pwa.mjs} +0 -0
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -128,8 +128,6 @@ const module = defineNuxtModule({
|
|
|
128
128
|
if (plugin)
|
|
129
129
|
throw new Error("Remove vite-plugin-pwa plugin from Vite Plugins entry in Nuxt config file!");
|
|
130
130
|
if (options.manifest && isClient) {
|
|
131
|
-
const configuration = "virtual:nuxt-pwa-configuration";
|
|
132
|
-
const resolvedConfiguration = `\0${configuration}`;
|
|
133
131
|
viteInlineConfig.plugins.push({
|
|
134
132
|
name: "vite-pwa-nuxt:webmanifest:build",
|
|
135
133
|
apply: "build",
|
|
@@ -142,7 +140,13 @@ const module = defineNuxtModule({
|
|
|
142
140
|
await writeWebManifest(manifestDir, options.manifestFilename || "manifest.webmanifest", api);
|
|
143
141
|
}
|
|
144
142
|
}
|
|
145
|
-
}
|
|
143
|
+
});
|
|
144
|
+
}
|
|
145
|
+
if (isClient) {
|
|
146
|
+
viteInlineConfig.plugins = viteInlineConfig.plugins || [];
|
|
147
|
+
const configuration = "virtual:nuxt-pwa-configuration";
|
|
148
|
+
const resolvedConfiguration = `\0${configuration}`;
|
|
149
|
+
viteInlineConfig.plugins.push({
|
|
146
150
|
name: "vite-pwa-nuxt:configuration",
|
|
147
151
|
enforce: "pre",
|
|
148
152
|
resolveId(id) {
|
|
@@ -1,2 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import type { UnwrapNestedRefs } from 'vue';
|
|
2
|
+
import type { PwaInjection } from './pwa';
|
|
3
|
+
import type { Plugin } from '#app/nuxt';
|
|
4
|
+
declare const plugin: Plugin<{
|
|
5
|
+
pwa?: UnwrapNestedRefs<PwaInjection>;
|
|
6
|
+
}>;
|
|
7
|
+
export default plugin;
|
|
@@ -2,7 +2,7 @@ import { nextTick, reactive, ref } from "vue";
|
|
|
2
2
|
import { useRegisterSW } from "virtual:pwa-register/vue";
|
|
3
3
|
import { installPrompt, periodicSyncForUpdates } from "virtual:nuxt-pwa-configuration";
|
|
4
4
|
import { defineNuxtPlugin } from "#imports";
|
|
5
|
-
|
|
5
|
+
const plugin = defineNuxtPlugin(() => {
|
|
6
6
|
const registrationError = ref(false);
|
|
7
7
|
const swActivated = ref(false);
|
|
8
8
|
const showInstallPrompt = ref(false);
|
|
@@ -110,3 +110,4 @@ export default defineNuxtPlugin(() => {
|
|
|
110
110
|
}
|
|
111
111
|
};
|
|
112
112
|
});
|
|
113
|
+
export default plugin;
|
|
@@ -1,2 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import type { UnwrapNestedRefs } from 'vue';
|
|
2
|
+
import type { PwaInjection } from './pwa';
|
|
3
|
+
import type { Plugin } from '#app/nuxt';
|
|
4
|
+
declare const plugin: Plugin<{
|
|
5
|
+
pwa?: UnwrapNestedRefs<PwaInjection>;
|
|
6
|
+
}>;
|
|
7
|
+
export default plugin;
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vite-pwa/nuxt",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.2.
|
|
5
|
-
"packageManager": "pnpm@8.10.
|
|
4
|
+
"version": "0.2.2",
|
|
5
|
+
"packageManager": "pnpm@8.10.3",
|
|
6
6
|
"description": "Zero-config PWA for Nuxt 3",
|
|
7
7
|
"author": "antfu <anthonyfu117@hotmail.com>",
|
|
8
8
|
"license": "MIT",
|
|
@@ -95,4 +95,4 @@
|
|
|
95
95
|
"vite-plugin-pwa"
|
|
96
96
|
]
|
|
97
97
|
}
|
|
98
|
-
}
|
|
98
|
+
}
|
|
File without changes
|
|
File without changes
|