UNPKG

974 BTypeScriptView Raw
1import { Options as SwPrecacheOptions } from "sw-precache";
2import { Plugin } from "webpack";
3
4// workaround to override parent types
5interface _Options extends SwPrecacheOptions {
6 importScripts?: any;
7}
8
9declare namespace SWPrecacheWebpackPlugin {
10 interface Options extends _Options {
11 filename?: string | undefined;
12 filepath?: string | undefined;
13 staticFileGlobsIgnorePatterns?: RegExp[] | undefined;
14 mergeStaticsConfig?: boolean | undefined;
15 minify?: boolean | undefined;
16
17 // override sw-precache options
18 importScripts?:
19 | Array<
20 | string
21 | {
22 chunkName?: string | undefined;
23 filename?: string | undefined;
24 }
25 >
26 | undefined;
27 }
28}
29
30declare class SWPrecacheWebpackPlugin extends Plugin {
31 constructor(options?: SWPrecacheWebpackPlugin.Options);
32}
33
34export = SWPrecacheWebpackPlugin;