1.4.5 • Published 6 months ago
@types/appcache-webpack-plugin v1.4.5
Installation
npm install --save @types/appcache-webpack-plugin
Summary
This package contains type definitions for appcache-webpack-plugin (https://github.com/lettertwo/appcache-webpack-plugin).
Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/appcache-webpack-plugin.
index.d.ts
// Type definitions for appcache-webpack-plugin 1.4
// Project: https://github.com/lettertwo/appcache-webpack-plugin
// Definitions by: Piotr Błażejewicz <https://github.com/peterblazejewicz>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 3.7
import webpack = require('webpack');
/**
* Generate an HTML5 Application Cache for a Webpack build
*/
declare class AppCachePlugin extends webpack.Plugin {
AppCache: AppCachePlugin.AppCache;
constructor(options?: AppCachePlugin.Options);
}
declare namespace AppCachePlugin {
interface Options {
/**
* 'additional assets to cache
*/
cache?: string[] | undefined;
/**
* Assets that may be accessed via the network.
* @default ['*']
*/
network?: string[] | null | undefined;
/**
* Fallback assets
*/
fallback?: string[] | undefined;
/**
* Settings
*/
settings?: string[] | undefined;
/**
* Assets in the compilation that match any of these patterns will be excluded from the manifest.
* @default []
*/
exclude?: Array<string | RegExp> | undefined;
/**
* The filename to write the appcache to
* @default 'manifest.appcache'
*/
output?: string | undefined;
/**
* @default ''
*/
comment?: string | undefined;
}
class AppCache {
constructor(
cache: string,
network: string[],
fallback: string[],
settings: string[],
hash: string,
comment: string,
);
addAsset(asset: string): void;
size(): number;
getManifestBody(): string;
source(): string;
}
}
export = AppCachePlugin;
Additional Details
- Last updated: Wed, 07 Jul 2021 21:44:27 GMT
- Dependencies: @types/webpack
- Global values: none
Credits
These definitions were written by Piotr Błażejewicz.