@serwist/nuxt 10.0.0-preview.7 → 10.0.0-preview.9
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 +2 -3
- package/dist/module.mjs +6 -7
- package/package.json +14 -14
package/dist/module.json
CHANGED
@@ -2,10 +2,9 @@
|
|
2
2
|
"name": "@serwist/nuxt",
|
3
3
|
"configKey": "serwist",
|
4
4
|
"compatibility": {
|
5
|
-
"nuxt": "^3.8.0"
|
6
|
-
"bridge": false
|
5
|
+
"nuxt": "^3.8.0 || ^4.0.0"
|
7
6
|
},
|
8
|
-
"version": "10.0.0-preview.
|
7
|
+
"version": "10.0.0-preview.9",
|
9
8
|
"builder": {
|
10
9
|
"@nuxt/module-builder": "1.0.1",
|
11
10
|
"unbuild": "unknown"
|
package/dist/module.mjs
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
import path from 'node:path';
|
2
2
|
import { defineNuxtModule, createResolver, addPlugin, extendWebpackConfig } from '@nuxt/kit';
|
3
3
|
import { resolveEntry } from '@serwist/utils/node';
|
4
|
-
import { createContext, main,
|
4
|
+
import { createContext, main, dev, generateServiceWorker } from 'vite-plugin-serwist';
|
5
5
|
import { createHash } from 'node:crypto';
|
6
6
|
import { createReadStream } from 'node:fs';
|
7
7
|
import fsp from 'node:fs/promises';
|
8
8
|
|
9
|
-
const version = "10.0.0-preview.
|
9
|
+
const version = "10.0.0-preview.9";
|
10
10
|
const packageJson = {
|
11
11
|
version: version};
|
12
12
|
|
@@ -18,7 +18,7 @@ function configurePwaOptions(options, nuxt, nitroConfig) {
|
|
18
18
|
options.dontCacheBustURLsMatching = new RegExp(buildAssetsDir);
|
19
19
|
}
|
20
20
|
if (nuxt.options.experimental.payloadExtraction) {
|
21
|
-
const enableGlobPatterns = nuxt.options._generate || !!nitroConfig.prerender?.routes?.length || Object.values(nitroConfig.routeRules ?? {}).some((r) => r.prerender);
|
21
|
+
const enableGlobPatterns = nuxt.options.nitro.static || nuxt.options._generate || !!nitroConfig.prerender?.routes?.length || Object.values(nitroConfig.routeRules ?? {}).some((r) => r.prerender);
|
22
22
|
if (enableGlobPatterns) {
|
23
23
|
options.globPatterns = options.globPatterns ?? [];
|
24
24
|
options.globPatterns.push("**/_payload.json");
|
@@ -84,13 +84,12 @@ const module = defineNuxtModule({
|
|
84
84
|
name: "@serwist/nuxt",
|
85
85
|
configKey: "serwist",
|
86
86
|
compatibility: {
|
87
|
-
nuxt: "^3.8.0"
|
88
|
-
bridge: false
|
87
|
+
nuxt: "^3.8.0 || ^4.0.0"
|
89
88
|
},
|
90
89
|
version: packageJson.version
|
91
90
|
},
|
92
91
|
defaults(nuxt) {
|
93
|
-
const publicDir =
|
92
|
+
const publicDir = path.resolve(nuxt.options.rootDir, ".output/public");
|
94
93
|
return {
|
95
94
|
base: nuxt.options.app.baseURL,
|
96
95
|
scope: nuxt.options.app.baseURL,
|
@@ -156,7 +155,7 @@ const module = defineNuxtModule({
|
|
156
155
|
});
|
157
156
|
}
|
158
157
|
ctx = createContext(userOptions, "nuxt");
|
159
|
-
viteInlineConfig.plugins.push(main(ctx),
|
158
|
+
viteInlineConfig.plugins.push(main(ctx), dev(ctx));
|
160
159
|
});
|
161
160
|
extendWebpackConfig(() => {
|
162
161
|
throw new Error("Webpack is not supported: '@serwist/nuxt' can only be used with Vite!");
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@serwist/nuxt",
|
3
|
-
"version": "10.0.0-preview.
|
3
|
+
"version": "10.0.0-preview.9",
|
4
4
|
"type": "module",
|
5
5
|
"sideEffects": false,
|
6
6
|
"description": "A Nuxt module that integrates Serwist into your application.",
|
@@ -51,28 +51,28 @@
|
|
51
51
|
]
|
52
52
|
},
|
53
53
|
"dependencies": {
|
54
|
-
"@nuxt/kit": "
|
55
|
-
"@serwist/build": "10.0.0-preview.
|
56
|
-
"@serwist/utils": "10.0.0-preview.
|
57
|
-
"@serwist/window": "10.0.0-preview.
|
58
|
-
"vite-plugin-serwist": "10.0.0-preview.
|
54
|
+
"@nuxt/kit": "4.0.0",
|
55
|
+
"@serwist/build": "10.0.0-preview.9",
|
56
|
+
"@serwist/utils": "10.0.0-preview.9",
|
57
|
+
"@serwist/window": "10.0.0-preview.9",
|
58
|
+
"vite-plugin-serwist": "10.0.0-preview.9"
|
59
59
|
},
|
60
60
|
"devDependencies": {
|
61
61
|
"@nuxt/module-builder": "1.0.1",
|
62
|
-
"@nuxt/schema": "
|
63
|
-
"@types/node": "
|
64
|
-
"eslint": "9.
|
65
|
-
"nuxt": "
|
62
|
+
"@nuxt/schema": "4.0.0",
|
63
|
+
"@types/node": "24.0.14",
|
64
|
+
"eslint": "9.31.0",
|
65
|
+
"nuxt": "4.0.0",
|
66
66
|
"rimraf": "6.0.1",
|
67
67
|
"serve": "14.2.4",
|
68
68
|
"typescript": "5.8.3",
|
69
|
-
"vite": "
|
70
|
-
"vue-tsc": "
|
71
|
-
"@serwist/configs": "10.0.0-preview.
|
69
|
+
"vite": "7.0.5",
|
70
|
+
"vue-tsc": "3.0.1",
|
71
|
+
"@serwist/configs": "10.0.0-preview.9"
|
72
72
|
},
|
73
73
|
"peerDependencies": {
|
74
74
|
"typescript": ">=5.0.0",
|
75
|
-
"vite": "
|
75
|
+
"vite": ">=5.0.0"
|
76
76
|
},
|
77
77
|
"peerDependenciesMeta": {
|
78
78
|
"typescript": {
|