@serwist/nuxt 9.1.0-preview.0 → 10.0.0-preview.1
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 +114 -4
- package/package.json +13 -13
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
@@ -1,11 +1,121 @@
|
|
1
1
|
import path from 'node:path';
|
2
2
|
import { defineNuxtModule, createResolver, addPlugin, extendWebpackConfig } from '@nuxt/kit';
|
3
|
-
import { resolveEntry, createContext, main, dev, generateServiceWorker } from 'vite-plugin-serwist';
|
3
|
+
import { resolveEntry, createContext, main as main$1, dev, generateServiceWorker } from 'vite-plugin-serwist';
|
4
4
|
import { createHash } from 'node:crypto';
|
5
5
|
import { createReadStream } from 'node:fs';
|
6
6
|
import fsp from 'node:fs/promises';
|
7
7
|
|
8
|
-
const
|
8
|
+
const name = "@serwist/nuxt";
|
9
|
+
const version = "10.0.0-preview.1";
|
10
|
+
const type = "module";
|
11
|
+
const description = "A Nuxt module that integrates Serwist into your application.";
|
12
|
+
const files = [
|
13
|
+
"dist"
|
14
|
+
];
|
15
|
+
const keywords = [
|
16
|
+
"nuxt",
|
17
|
+
"pwa",
|
18
|
+
"vite",
|
19
|
+
"vite-plugin",
|
20
|
+
"serwist",
|
21
|
+
"serwistjs",
|
22
|
+
"pwa",
|
23
|
+
"sw",
|
24
|
+
"service worker",
|
25
|
+
"web",
|
26
|
+
"service-worker",
|
27
|
+
"nuxt-module"
|
28
|
+
];
|
29
|
+
const engines = {
|
30
|
+
node: ">=18.0.0"
|
31
|
+
};
|
32
|
+
const repository = "https://github.com/serwist/serwist";
|
33
|
+
const bugs = "https://github.com/serwist/serwist/issues";
|
34
|
+
const homepage = "https://serwist.pages.dev";
|
35
|
+
const main = "./dist/module.mjs";
|
36
|
+
const types = "./dist/types.d.ts";
|
37
|
+
const exports = {
|
38
|
+
".": {
|
39
|
+
types: "./dist/types.d.mts",
|
40
|
+
"default": "./dist/module.mjs"
|
41
|
+
}
|
42
|
+
};
|
43
|
+
const build = {
|
44
|
+
externals: [
|
45
|
+
"node:child_process",
|
46
|
+
"node:fs",
|
47
|
+
"node:path",
|
48
|
+
"consola",
|
49
|
+
"esbuild",
|
50
|
+
"rollup",
|
51
|
+
"vite",
|
52
|
+
"@nuxt/kit",
|
53
|
+
"@serwist/build",
|
54
|
+
"vite-plugin-serwist",
|
55
|
+
"virtual:serwist-nuxt-configuration",
|
56
|
+
"virtual:serwist"
|
57
|
+
]
|
58
|
+
};
|
59
|
+
const scripts = {
|
60
|
+
build: "nuxt-module-build prepare && nuxt-module-build build",
|
61
|
+
dev: "nuxi dev playground --port 5173",
|
62
|
+
"dev:generate": "nuxi generate playground",
|
63
|
+
"dev:generate:netlify": "NITRO_PRESET=netlify nuxi generate playground",
|
64
|
+
"dev:generate:vercel": "NITRO_PRESET=vercel nuxi generate playground",
|
65
|
+
"dev:build": "nuxi build playground",
|
66
|
+
"dev:prepare": "nuxt-module-build build --stub && nuxt-module-build prepare && nuxi prepare playground",
|
67
|
+
"dev:preview:build": "nr dev:build && node playground/.output/server/index.mjs",
|
68
|
+
"dev:preview:generate": "nr dev:generate && serve playground/dist"
|
69
|
+
};
|
70
|
+
const dependencies = {
|
71
|
+
"@nuxt/kit": "3.15.4",
|
72
|
+
"@serwist/build": "workspace:*",
|
73
|
+
"vite-plugin-serwist": "workspace:*",
|
74
|
+
"@serwist/window": "workspace:*"
|
75
|
+
};
|
76
|
+
const devDependencies = {
|
77
|
+
"@nuxt/module-builder": "0.8.4",
|
78
|
+
"@nuxt/schema": "3.15.4",
|
79
|
+
"@serwist/configs": "workspace:*",
|
80
|
+
"@types/node": "22.13.5",
|
81
|
+
eslint: "9.21.0",
|
82
|
+
nuxt: "3.15.4",
|
83
|
+
rimraf: "5.0.9",
|
84
|
+
serve: "14.2.4",
|
85
|
+
typescript: "5.7.3",
|
86
|
+
vite: "6.1.1",
|
87
|
+
"vue-tsc": "2.2.4"
|
88
|
+
};
|
89
|
+
const peerDependencies = {
|
90
|
+
typescript: ">=5.0.0",
|
91
|
+
vite: "^5.0.0"
|
92
|
+
};
|
93
|
+
const peerDependenciesMeta = {
|
94
|
+
typescript: {
|
95
|
+
optional: true
|
96
|
+
}
|
97
|
+
};
|
98
|
+
const packageJson = {
|
99
|
+
name: name,
|
100
|
+
version: version,
|
101
|
+
type: type,
|
102
|
+
description: description,
|
103
|
+
files: files,
|
104
|
+
keywords: keywords,
|
105
|
+
engines: engines,
|
106
|
+
repository: repository,
|
107
|
+
bugs: bugs,
|
108
|
+
homepage: homepage,
|
109
|
+
main: main,
|
110
|
+
types: types,
|
111
|
+
exports: exports,
|
112
|
+
build: build,
|
113
|
+
scripts: scripts,
|
114
|
+
dependencies: dependencies,
|
115
|
+
devDependencies: devDependencies,
|
116
|
+
peerDependencies: peerDependencies,
|
117
|
+
peerDependenciesMeta: peerDependenciesMeta
|
118
|
+
};
|
9
119
|
|
10
120
|
function configurePwaOptions(options, nuxt, nitroConfig) {
|
11
121
|
let buildAssetsDir = nuxt.options.app.buildAssetsDir ?? "_nuxt/";
|
@@ -88,7 +198,7 @@ const module = defineNuxtModule({
|
|
88
198
|
nuxt: "^3.8.0",
|
89
199
|
bridge: false
|
90
200
|
},
|
91
|
-
version
|
201
|
+
version: packageJson.version
|
92
202
|
},
|
93
203
|
defaults(nuxt) {
|
94
204
|
const publicDir = nuxt.options.nitro?.output?.publicDir ? path.resolve(nuxt.options.nitro.output.publicDir) : path.resolve(nuxt.options.buildDir, "../.output/public");
|
@@ -160,7 +270,7 @@ const module = defineNuxtModule({
|
|
160
270
|
});
|
161
271
|
}
|
162
272
|
ctx = createContext(userOptions, "nuxt");
|
163
|
-
viteInlineConfig.plugins.push(main(ctx), dev(ctx));
|
273
|
+
viteInlineConfig.plugins.push(main$1(ctx), dev(ctx));
|
164
274
|
});
|
165
275
|
extendWebpackConfig(() => {
|
166
276
|
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": "
|
3
|
+
"version": "10.0.0-preview.1",
|
4
4
|
"type": "module",
|
5
5
|
"description": "A Nuxt module that integrates Serwist into your application.",
|
6
6
|
"files": [
|
@@ -51,23 +51,23 @@
|
|
51
51
|
]
|
52
52
|
},
|
53
53
|
"dependencies": {
|
54
|
-
"@nuxt/kit": "3.
|
55
|
-
"@serwist/build": "
|
56
|
-
"vite-plugin-serwist": "
|
57
|
-
"@serwist/window": "
|
54
|
+
"@nuxt/kit": "3.15.4",
|
55
|
+
"@serwist/build": "10.0.0-preview.1",
|
56
|
+
"vite-plugin-serwist": "10.0.0-preview.1",
|
57
|
+
"@serwist/window": "10.0.0-preview.1"
|
58
58
|
},
|
59
59
|
"devDependencies": {
|
60
60
|
"@nuxt/module-builder": "0.8.4",
|
61
|
-
"@nuxt/schema": "3.
|
62
|
-
"@types/node": "22.
|
63
|
-
"eslint": "9.
|
64
|
-
"nuxt": "3.
|
61
|
+
"@nuxt/schema": "3.15.4",
|
62
|
+
"@types/node": "22.13.5",
|
63
|
+
"eslint": "9.21.0",
|
64
|
+
"nuxt": "3.15.4",
|
65
65
|
"rimraf": "5.0.9",
|
66
66
|
"serve": "14.2.4",
|
67
|
-
"typescript": "5.
|
68
|
-
"vite": "
|
69
|
-
"vue-tsc": "2.
|
70
|
-
"@serwist/configs": "
|
67
|
+
"typescript": "5.7.3",
|
68
|
+
"vite": "6.1.1",
|
69
|
+
"vue-tsc": "2.2.4",
|
70
|
+
"@serwist/configs": "10.0.0-preview.1"
|
71
71
|
},
|
72
72
|
"peerDependencies": {
|
73
73
|
"typescript": ">=5.0.0",
|