ardiffact

Home > @microsoft/webpack-stats-differ > diff

diff() function

Calculates the diff between two sets of bundle stats

Signature:

export declare function diff(baselineDir: string, candidateDir: string, fileFilter?: string | string[], filter?: string | string[], remoteArtifactManifests?: {
    baseline: string | RemoteArtifact[];
    candidate: string | RemoteArtifact[];
    hostUrl: string;
}): Promise<FileDiffResults>;

Parameters

Parameter Type Description
baselineDir string Directory containing webpack stat files of the baseline
candidateDir string Directory containing webpack stat files of the candidate
fileFilter string | string[] Optionally pass filter to omit certain files using globby syntax
filter string | string[] Filter out certain assets for the bundle size calculation
remoteArtifactManifests { baseline: string | RemoteArtifact[]; candidate: string | RemoteArtifact[]; hostUrl: string; } Either a path on disk to the serialized JSON manifest or the RemoteArtifact list manifest object itself

Returns:

Promise<FileDiffResults> The diff object