@vite-pwa/nuxt 0.2.1 → 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 CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "pwa",
3
3
  "configKey": "pwa",
4
- "version": "0.2.1"
4
+ "version": "0.2.2"
5
5
  }
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) {
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@vite-pwa/nuxt",
3
3
  "type": "module",
4
- "version": "0.2.1",
5
- "packageManager": "pnpm@8.10.2",
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",