@serwist/vite 9.0.2 → 9.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/index.js +1 -1
- package/dist/index.worker.d.ts.map +1 -1
- package/dist/index.worker.js +7 -2
- package/dist/lib/log.d.ts.map +1 -1
- package/dist/lib/modules.d.ts.map +1 -1
- package/dist/lib/options.d.ts.map +1 -1
- package/dist/lib/schema.d.ts +31 -23
- package/dist/lib/schema.d.ts.map +1 -1
- package/dist/lib/validator.d.ts.map +1 -1
- package/dist/plugins/build.d.ts +1 -1
- package/dist/plugins/build.d.ts.map +1 -1
- package/dist/plugins/main.d.ts +1 -1
- package/dist/plugins/main.d.ts.map +1 -1
- package/package.json +13 -13
- package/src/index.worker.ts +7 -2
package/dist/index.js
CHANGED
|
@@ -7,7 +7,7 @@ import { validationErrorMap, SerwistConfigError } from '@serwist/build/schema';
|
|
|
7
7
|
import { normalizePath } from 'vite';
|
|
8
8
|
import process from 'node:process';
|
|
9
9
|
|
|
10
|
-
var version = "9.0.
|
|
10
|
+
var version = "9.0.4";
|
|
11
11
|
|
|
12
12
|
const logSerwistResult = (buildResult, viteOptions)=>{
|
|
13
13
|
const { logLevel = "info" } = viteOptions;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.worker.d.ts","sourceRoot":"","sources":["../src/index.worker.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAG9C;;;;;GAKG;AACH,eAAO,MAAM,YAAY,EAAE,cAAc,
|
|
1
|
+
{"version":3,"file":"index.worker.d.ts","sourceRoot":"","sources":["../src/index.worker.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAG9C;;;;;GAKG;AACH,eAAO,MAAM,YAAY,EAAE,cAAc,EAmHpC,CAAC"}
|
package/dist/index.worker.js
CHANGED
|
@@ -1,6 +1,11 @@
|
|
|
1
|
-
import { CacheFirst, ExpirationPlugin, StaleWhileRevalidate, NetworkFirst } from 'serwist';
|
|
1
|
+
import { NetworkOnly, CacheFirst, ExpirationPlugin, StaleWhileRevalidate, NetworkFirst } from 'serwist';
|
|
2
2
|
|
|
3
|
-
const defaultCache = import.meta.env.DEV ? [
|
|
3
|
+
const defaultCache = import.meta.env.DEV ? [
|
|
4
|
+
{
|
|
5
|
+
matcher: /.*/i,
|
|
6
|
+
handler: new NetworkOnly()
|
|
7
|
+
}
|
|
8
|
+
] : [
|
|
4
9
|
{
|
|
5
10
|
matcher: /^https:\/\/fonts\.(?:googleapis|gstatic)\.com\/.*/i,
|
|
6
11
|
handler: new CacheFirst({
|
package/dist/lib/log.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"log.d.ts","sourceRoot":"","sources":["../../src/lib/log.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAElD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,MAAM,CAAC;AAI3C,eAAO,MAAM,gBAAgB,gBAAiB,
|
|
1
|
+
{"version":3,"file":"log.d.ts","sourceRoot":"","sources":["../../src/lib/log.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAElD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,MAAM,CAAC;AAI3C,eAAO,MAAM,gBAAgB,gBAAiB,IAAI,CAAC,WAAW,EAAE,OAAO,GAAG,MAAM,GAAG,UAAU,CAAC,eAAe,cAAc,SAkB1H,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"modules.d.ts","sourceRoot":"","sources":["../../src/lib/modules.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,KAAK,YAAY,MAAM,gBAAgB,CAAC;AAEpD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAEvD,eAAO,MAAM,gBAAgB,QAAa,
|
|
1
|
+
{"version":3,"file":"modules.d.ts","sourceRoot":"","sources":["../../src/lib/modules.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,KAAK,YAAY,MAAM,gBAAgB,CAAC;AAEpD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAEvD,eAAO,MAAM,gBAAgB,QAAa,OAAO,CAAC,OAAO,YAAY,CASpE,CAAC;AAEF,UAAU,WAAY,SAAQ,YAAY,CAAC,iBAAiB;IAC1D,cAAc,EAAE,MAAM,CAAC;CACxB;AAED,eAAO,MAAM,cAAc,YAAmB,YAAY,CAAC,0BAA0B,KAAG,OAAO,CAAC,WAAW,CAW1G,CAAC;AAEF,eAAO,MAAM,qBAAqB,QAAe,kBAAkB,qCAwIlE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"options.d.ts","sourceRoot":"","sources":["../../src/lib/options.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,MAAM,CAAC;AAE3C,OAAO,KAAK,EAAE,aAAa,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAC;AAwBvE,eAAO,MAAM,cAAc,YAAmB,aAAa,cAAc,cAAc,KAAG,
|
|
1
|
+
{"version":3,"file":"options.d.ts","sourceRoot":"","sources":["../../src/lib/options.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,MAAM,CAAC;AAE3C,OAAO,KAAK,EAAE,aAAa,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAC;AAwBvE,eAAO,MAAM,cAAc,YAAmB,aAAa,cAAc,cAAc,KAAG,OAAO,CAAC,qBAAqB,CA8CtH,CAAC"}
|
package/dist/lib/schema.d.ts
CHANGED
|
@@ -94,7 +94,7 @@ export declare const injectManifestPartial: z.ZodObject<{
|
|
|
94
94
|
minify?: boolean | "terser" | "esbuild" | undefined;
|
|
95
95
|
} | undefined;
|
|
96
96
|
}>;
|
|
97
|
-
export declare const injectManifestOptions: z.ZodObject<{
|
|
97
|
+
export declare const injectManifestOptions: z.ZodObject<z.objectUtil.extendShape<z.objectUtil.extendShape<z.objectUtil.extendShape<z.objectUtil.extendShape<z.objectUtil.extendShape<{
|
|
98
98
|
additionalPrecacheEntries: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodObject<{
|
|
99
99
|
integrity: z.ZodOptional<z.ZodString>;
|
|
100
100
|
revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -110,12 +110,13 @@ export declare const injectManifestOptions: z.ZodObject<{
|
|
|
110
110
|
}>]>, "many">>;
|
|
111
111
|
disablePrecacheManifest: z.ZodDefault<z.ZodBoolean>;
|
|
112
112
|
dontCacheBustURLsMatching: z.ZodOptional<z.ZodType<RegExp, z.ZodTypeDef, RegExp>>;
|
|
113
|
-
manifestTransforms: z.ZodOptional<z.ZodArray<z.ZodFunction<z.ZodTuple<[z.ZodArray<z.ZodObject<{
|
|
113
|
+
manifestTransforms: z.ZodOptional<z.ZodArray<z.ZodFunction<z.ZodTuple<[z.ZodArray<z.ZodObject<z.objectUtil.extendShape<{
|
|
114
114
|
integrity: z.ZodOptional<z.ZodString>;
|
|
115
115
|
revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
116
116
|
url: z.ZodString;
|
|
117
|
+
}, {
|
|
117
118
|
size: z.ZodNumber;
|
|
118
|
-
}
|
|
119
|
+
}>, "strip", z.ZodTypeAny, {
|
|
119
120
|
url: string;
|
|
120
121
|
size: number;
|
|
121
122
|
integrity?: string | undefined;
|
|
@@ -126,12 +127,13 @@ export declare const injectManifestOptions: z.ZodObject<{
|
|
|
126
127
|
integrity?: string | undefined;
|
|
127
128
|
revision?: string | null | undefined;
|
|
128
129
|
}>, "many">, z.ZodOptional<z.ZodUnknown>], null>, z.ZodUnion<[z.ZodPromise<z.ZodObject<{
|
|
129
|
-
manifest: z.ZodArray<z.ZodObject<{
|
|
130
|
+
manifest: z.ZodArray<z.ZodObject<z.objectUtil.extendShape<{
|
|
130
131
|
integrity: z.ZodOptional<z.ZodString>;
|
|
131
132
|
revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
132
133
|
url: z.ZodString;
|
|
134
|
+
}, {
|
|
133
135
|
size: z.ZodNumber;
|
|
134
|
-
}
|
|
136
|
+
}>, "strip", z.ZodTypeAny, {
|
|
135
137
|
url: string;
|
|
136
138
|
size: number;
|
|
137
139
|
integrity?: string | undefined;
|
|
@@ -160,12 +162,13 @@ export declare const injectManifestOptions: z.ZodObject<{
|
|
|
160
162
|
}[];
|
|
161
163
|
warnings?: string[] | undefined;
|
|
162
164
|
}>>, z.ZodObject<{
|
|
163
|
-
manifest: z.ZodArray<z.ZodObject<{
|
|
165
|
+
manifest: z.ZodArray<z.ZodObject<z.objectUtil.extendShape<{
|
|
164
166
|
integrity: z.ZodOptional<z.ZodString>;
|
|
165
167
|
revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
166
168
|
url: z.ZodString;
|
|
169
|
+
}, {
|
|
167
170
|
size: z.ZodNumber;
|
|
168
|
-
}
|
|
171
|
+
}>, "strip", z.ZodTypeAny, {
|
|
169
172
|
url: string;
|
|
170
173
|
size: number;
|
|
171
174
|
integrity?: string | undefined;
|
|
@@ -196,15 +199,20 @@ export declare const injectManifestOptions: z.ZodObject<{
|
|
|
196
199
|
}>]>>, "many">>;
|
|
197
200
|
maximumFileSizeToCacheInBytes: z.ZodDefault<z.ZodNumber>;
|
|
198
201
|
modifyURLPrefix: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
202
|
+
}, {
|
|
199
203
|
globFollow: z.ZodDefault<z.ZodBoolean>;
|
|
200
204
|
globIgnores: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
201
205
|
globPatterns: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
202
206
|
globStrict: z.ZodDefault<z.ZodBoolean>;
|
|
203
207
|
templatedURLs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>>;
|
|
208
|
+
}>, {
|
|
204
209
|
injectionPoint: z.ZodDefault<z.ZodString>;
|
|
205
210
|
swSrc: z.ZodString;
|
|
211
|
+
}>, {
|
|
206
212
|
swDest: z.ZodString;
|
|
213
|
+
}>, {
|
|
207
214
|
globDirectory: z.ZodString;
|
|
215
|
+
}>, {
|
|
208
216
|
mode: z.ZodUnion<[z.ZodLiteral<"development">, z.ZodLiteral<"production">]>;
|
|
209
217
|
type: z.ZodDefault<z.ZodUnion<[z.ZodLiteral<"classic">, z.ZodLiteral<"module">]>>;
|
|
210
218
|
scope: z.ZodString;
|
|
@@ -237,7 +245,7 @@ export declare const injectManifestOptions: z.ZodObject<{
|
|
|
237
245
|
bundle?: boolean | undefined;
|
|
238
246
|
minify?: boolean | "terser" | "esbuild" | undefined;
|
|
239
247
|
}>>;
|
|
240
|
-
}
|
|
248
|
+
}>, "strict", z.ZodTypeAny, {
|
|
241
249
|
type: "classic" | "module";
|
|
242
250
|
mode: "development" | "production";
|
|
243
251
|
scope: string;
|
|
@@ -303,6 +311,21 @@ export declare const injectManifestOptions: z.ZodObject<{
|
|
|
303
311
|
swSrc: string;
|
|
304
312
|
swDest: string;
|
|
305
313
|
globDirectory: string;
|
|
314
|
+
type?: "classic" | "module" | undefined;
|
|
315
|
+
disable?: boolean | undefined;
|
|
316
|
+
integration?: {
|
|
317
|
+
beforeBuildServiceWorker?: ((args_0: any) => void | Promise<void>) | undefined;
|
|
318
|
+
closeBundleOrder?: "pre" | "post" | null | undefined;
|
|
319
|
+
configureOptions?: ((args_0: any, args_1: any) => void | Promise<void>) | undefined;
|
|
320
|
+
} | undefined;
|
|
321
|
+
swUrl?: string | undefined;
|
|
322
|
+
plugins?: any[] | undefined;
|
|
323
|
+
rollupFormat?: "es" | "iife" | undefined;
|
|
324
|
+
rollupOptions?: Record<string, any> | undefined;
|
|
325
|
+
devOptions?: {
|
|
326
|
+
bundle?: boolean | undefined;
|
|
327
|
+
minify?: boolean | "terser" | "esbuild" | undefined;
|
|
328
|
+
} | undefined;
|
|
306
329
|
additionalPrecacheEntries?: (string | {
|
|
307
330
|
url: string;
|
|
308
331
|
integrity?: string | undefined;
|
|
@@ -340,20 +363,5 @@ export declare const injectManifestOptions: z.ZodObject<{
|
|
|
340
363
|
globStrict?: boolean | undefined;
|
|
341
364
|
templatedURLs?: Record<string, string | string[]> | undefined;
|
|
342
365
|
injectionPoint?: string | undefined;
|
|
343
|
-
type?: "classic" | "module" | undefined;
|
|
344
|
-
disable?: boolean | undefined;
|
|
345
|
-
integration?: {
|
|
346
|
-
beforeBuildServiceWorker?: ((args_0: any) => void | Promise<void>) | undefined;
|
|
347
|
-
closeBundleOrder?: "pre" | "post" | null | undefined;
|
|
348
|
-
configureOptions?: ((args_0: any, args_1: any) => void | Promise<void>) | undefined;
|
|
349
|
-
} | undefined;
|
|
350
|
-
swUrl?: string | undefined;
|
|
351
|
-
plugins?: any[] | undefined;
|
|
352
|
-
rollupFormat?: "es" | "iife" | undefined;
|
|
353
|
-
rollupOptions?: Record<string, any> | undefined;
|
|
354
|
-
devOptions?: {
|
|
355
|
-
bundle?: boolean | undefined;
|
|
356
|
-
minify?: boolean | "terser" | "esbuild" | undefined;
|
|
357
|
-
} | undefined;
|
|
358
366
|
}>;
|
|
359
367
|
//# sourceMappingURL=schema.d.ts.map
|
package/dist/lib/schema.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../src/lib/schema.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,KAAK;;;;;;;;;;;;EAIhB,CAAC;AAEH,eAAO,MAAM,UAAU;;;;;;;;;EAGrB,CAAC;AAEH,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAYhC,CAAC;AAEH,eAAO,MAAM,qBAAqB
|
|
1
|
+
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../src/lib/schema.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,KAAK;;;;;;;;;;;;EAIhB,CAAC;AAEH,eAAO,MAAM,UAAU;;;;;;;;;EAGrB,CAAC;AAEH,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAYhC,CAAC;AAEH,eAAO,MAAM,qBAAqB;;;;;;;iBAvBkC,CAAC;gBACnD,CAAC;;;iBAA4E,CAAC;gBAGjF,CAAC;;;;;;;;;;;;;iBAciB,CAAC;gBAAsC,CAAC;;;;iBAEvC,CAAC;gBAGL,CAAC;;;;;;;;;;;qBAO4N,CAAC;oBAA0C,CAAC;;;;qBAAkH,CAAC;oBAA0C,CAAC;;;;;;;qBAAiP,CAAC;oBAA0C,CAAC;;gBAA0D,CAAC;;;;;qBAA6H,CAAC;oBAA0C,CAAC;;gBAA0D,CAAC;;;;;;;;;;;qBAA8Z,CAAC;oBAA0C,CAAC;;;;qBAAkH,CAAC;oBAA0C,CAAC;;;;;;;qBAAiP,CAAC;oBAA0C,CAAC;;gBAA0D,CAAC;;;;;qBAA6H,CAAC;oBAA0C,CAAC;;gBAA0D,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBAA3U,CAAC;oBAA0C,CAAC;;;;;;;qBAAhtC,CAAC;oBAA0C,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBAA41C,CAAC;oBAA0C,CAAC;;;;;;;qBAAhtC,CAAC;oBAA0C,CAAC;;;;;;;;;;;;EADj4B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validator.d.ts","sourceRoot":"","sources":["../../src/lib/validator.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,YAAY,CAAC;AAEhE,eAAO,MAAM,6BAA6B,UAAiB,OAAO,KAAG,
|
|
1
|
+
{"version":3,"file":"validator.d.ts","sourceRoot":"","sources":["../../src/lib/validator.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,YAAY,CAAC;AAEhE,eAAO,MAAM,6BAA6B,UAAiB,OAAO,KAAG,OAAO,CAAC,6BAA6B,CAMzG,CAAC"}
|
package/dist/plugins/build.d.ts
CHANGED
|
@@ -8,5 +8,5 @@ import type { SerwistViteApi } from "../lib/types.js";
|
|
|
8
8
|
* @param api
|
|
9
9
|
* @returns
|
|
10
10
|
*/
|
|
11
|
-
export declare const buildPlugin: (ctx: SerwistViteContext, api: SerwistViteApi) => Plugin
|
|
11
|
+
export declare const buildPlugin: (ctx: SerwistViteContext, api: SerwistViteApi) => Plugin;
|
|
12
12
|
//# sourceMappingURL=build.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"build.d.ts","sourceRoot":"","sources":["../../src/plugins/build.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAEnC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAEtD;;;;;;GAMG;AACH,eAAO,MAAM,WAAW,QAAS,kBAAkB,OAAO,cAAc,
|
|
1
|
+
{"version":3,"file":"build.d.ts","sourceRoot":"","sources":["../../src/plugins/build.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAEnC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAEtD;;;;;;GAMG;AACH,eAAO,MAAM,WAAW,QAAS,kBAAkB,OAAO,cAAc,KAC9D,MAiBT,CAAC"}
|
package/dist/plugins/main.d.ts
CHANGED
|
@@ -8,5 +8,5 @@ import type { SerwistViteApi } from "../lib/types.js";
|
|
|
8
8
|
* @param api
|
|
9
9
|
* @returns
|
|
10
10
|
*/
|
|
11
|
-
export declare const mainPlugin: (ctx: SerwistViteContext, api: SerwistViteApi) => Plugin
|
|
11
|
+
export declare const mainPlugin: (ctx: SerwistViteContext, api: SerwistViteApi) => Plugin;
|
|
12
12
|
//# sourceMappingURL=main.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../../src/plugins/main.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,EAAc,MAAM,MAAM,CAAC;AAG/C,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAE5D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAEtD;;;;;;GAMG;AACH,eAAO,MAAM,UAAU,QAAS,kBAAkB,OAAO,cAAc,
|
|
1
|
+
{"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../../src/plugins/main.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,EAAc,MAAM,MAAM,CAAC;AAG/C,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAE5D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAEtD;;;;;;GAMG;AACH,eAAO,MAAM,UAAU,QAAS,kBAAkB,OAAO,cAAc,KAC7D,MAqCT,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@serwist/vite",
|
|
3
|
-
"version": "9.0.
|
|
3
|
+
"version": "9.0.4",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "A module that integrates Serwist into your Vite application.",
|
|
6
6
|
"files": [
|
|
@@ -69,21 +69,21 @@
|
|
|
69
69
|
"./package.json": "./package.json"
|
|
70
70
|
},
|
|
71
71
|
"dependencies": {
|
|
72
|
-
"glob": "
|
|
72
|
+
"glob": "11.0.0",
|
|
73
73
|
"kolorist": "1.8.0",
|
|
74
|
-
"zod": "3.
|
|
75
|
-
"serwist": "9.0.
|
|
76
|
-
"
|
|
77
|
-
"@serwist/build": "9.0.2"
|
|
74
|
+
"zod": "3.23.8",
|
|
75
|
+
"@serwist/build": "9.0.4",
|
|
76
|
+
"serwist": "9.0.4"
|
|
78
77
|
},
|
|
79
78
|
"devDependencies": {
|
|
80
|
-
"@types/node": "20.
|
|
81
|
-
"rollup": "4.
|
|
82
|
-
"typescript": "5.5.
|
|
83
|
-
"vite": "5.
|
|
84
|
-
"@serwist/configs": "9.0.
|
|
85
|
-
"serwist": "9.0.
|
|
86
|
-
"@serwist/utils": "9.0.
|
|
79
|
+
"@types/node": "20.14.10",
|
|
80
|
+
"rollup": "4.18.1",
|
|
81
|
+
"typescript": "5.5.3",
|
|
82
|
+
"vite": "5.3.4",
|
|
83
|
+
"@serwist/configs": "9.0.4",
|
|
84
|
+
"serwist": "9.0.4",
|
|
85
|
+
"@serwist/utils": "9.0.4",
|
|
86
|
+
"@serwist/window": "9.0.4"
|
|
87
87
|
},
|
|
88
88
|
"peerDependencies": {
|
|
89
89
|
"typescript": ">=5.0.0",
|
package/src/index.worker.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { RuntimeCaching } from "serwist";
|
|
2
|
-
import { CacheFirst, ExpirationPlugin, NetworkFirst, StaleWhileRevalidate } from "serwist";
|
|
2
|
+
import { CacheFirst, ExpirationPlugin, NetworkFirst, NetworkOnly, StaleWhileRevalidate } from "serwist";
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* The default, recommended list of caching strategies for applications
|
|
@@ -8,7 +8,12 @@ import { CacheFirst, ExpirationPlugin, NetworkFirst, StaleWhileRevalidate } from
|
|
|
8
8
|
* @see https://serwist.pages.dev/docs/vite/worker-exports#default-cache
|
|
9
9
|
*/
|
|
10
10
|
export const defaultCache: RuntimeCaching[] = import.meta.env.DEV
|
|
11
|
-
? [
|
|
11
|
+
? [
|
|
12
|
+
{
|
|
13
|
+
matcher: /.*/i,
|
|
14
|
+
handler: new NetworkOnly(),
|
|
15
|
+
},
|
|
16
|
+
]
|
|
12
17
|
: [
|
|
13
18
|
{
|
|
14
19
|
matcher: /^https:\/\/fonts\.(?:googleapis|gstatic)\.com\/.*/i,
|