-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnext-pwa.d.ts
More file actions
65 lines (62 loc) · 1.67 KB
/
Copy pathnext-pwa.d.ts
File metadata and controls
65 lines (62 loc) · 1.67 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
declare module 'next-pwa' {
import { NextConfig } from 'next';
interface PWAConfig {
dest?: string;
register?: boolean;
skipWaiting?: boolean;
disable?: boolean;
sw?: string;
scope?: string;
/**
* Paths (relative to the served output, e.g. "/sw-custom.js") that get
* wrapped in `importScripts(...)` calls inside the generated service
* worker. This is how custom push/notificationclick handlers actually
* become part of the registered service worker.
*/
importScripts?: string[];
runtimeCaching?: Array<{
urlPattern: RegExp | string;
handler: string;
method?: string;
options?: {
cacheName?: string;
expiration?: {
maxEntries?: number;
maxAgeSeconds?: number;
purgeOnQuotaError?: boolean;
};
networkTimeoutSeconds?: number;
rangeRequests?: boolean;
cacheableResponse?: {
statuses?: number[];
headers?: Record<string, string>;
};
backgroundSync?: {
name: string;
options?: {
maxRetentionTime?: number;
};
};
broadcastUpdate?: {
channelName: string;
};
matchOptions?: {
ignoreSearch?: boolean;
ignoreMethod?: boolean;
ignoreVary?: boolean;
};
};
}>;
publicExcludes?: string[];
buildExcludes?: (string | RegExp)[];
fallbacks?: {
image?: string;
audio?: string;
video?: string;
document?: string;
font?: string;
};
}
function withPWA(config: PWAConfig): (nextConfig: NextConfig) => NextConfig;
export default withPWA;
}