UNPKG

webpack-subresource-integrity

Version:
97 lines 2.3 kB
/** * Copyright (c) 2015-present, Waysact Pty Ltd * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ /// <reference types="node" /> import type { Chunk, Compilation, sources } from "webpack"; import { HtmlTagObject, SubresourceIntegrityPluginResolvedOptions, HWPAssets } from "./types"; import { Reporter } from "./reporter"; export declare class Plugin { /** * @internal */ private readonly compilation; /** * @internal */ private readonly options; /** * @internal */ private readonly reporter; /** * @internal */ private assetIntegrity; /** * @internal */ private hwpPublicPath; /** * @internal */ private sortedSccChunks; /** * @internal */ private chunkManifest; /** * @internal */ private hashByPlaceholder; constructor(compilation: Compilation, options: SubresourceIntegrityPluginResolvedOptions, reporter: Reporter); /** * @internal */ private warnIfHotUpdate; /** * @internal */ addMissingIntegrityHashes: (assets: Record<string, sources.Source>) => void; /** * @internal */ private replaceAsset; private warnAboutLongTermCaching; /** * @internal */ private processChunk; private processChunkAssets; /** * @internal */ addAttribute: (elName: string, source: string) => string; /** * @internal */ processAssets: (assets: Record<string, sources.Source>) => void; /** * @internal */ private hwpAssetPath; /** * @internal */ private getIntegrityChecksumForAsset; /** * @internal */ processTag: (tag: HtmlTagObject) => void; /** * @internal */ beforeRuntimeRequirements: () => void; getChildChunksToAddToChunkManifest(chunk: Chunk): Set<Chunk>; handleHwpPluginArgs: ({ assets }: { assets: HWPAssets; }) => void; handleHwpBodyTags: ({ headTags, bodyTags, }: { headTags: HtmlTagObject[]; bodyTags: HtmlTagObject[]; }) => void; updateHash(input: Buffer[], oldHash: string): string | undefined; } //# sourceMappingURL=plugin.d.ts.map