From 802faae451eb7f001b9599e7a27fe94370611aff Mon Sep 17 00:00:00 2001 From: Max Boguslavsky <521205+maxbogus@users.noreply.github.com> Date: Mon, 15 Jul 2019 19:45:04 +0300 Subject: [PATCH] Feature/update webpack bundle analyzer to match Plugin interface (#36836) * corrected formatting * corrected import --- types/webpack-bundle-analyzer/index.d.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/types/webpack-bundle-analyzer/index.d.ts b/types/webpack-bundle-analyzer/index.d.ts index bde0237d6d..e939b4529e 100644 --- a/types/webpack-bundle-analyzer/index.d.ts +++ b/types/webpack-bundle-analyzer/index.d.ts @@ -4,7 +4,7 @@ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.3 -import * as webpack from 'webpack'; +import { Plugin, Compiler, Stats } from 'webpack'; export namespace BundleAnalyzerPlugin { type ExcludeAssetsPatternFn = (assetName: string) => boolean; @@ -69,7 +69,7 @@ export namespace BundleAnalyzerPlugin { * Options for stats.toJson() method. * For example you can exclude sources of your modules from stats file with "source: false" option. */ - statsOptions?: null | webpack.Stats.ToJsonOptionsObject; + statsOptions?: null | Stats.ToJsonOptionsObject; /** * Default: `null`. @@ -89,6 +89,8 @@ export namespace BundleAnalyzerPlugin { } } -export class BundleAnalyzerPlugin extends webpack.Plugin { +export class BundleAnalyzerPlugin extends Plugin { constructor(options?: BundleAnalyzerPlugin.Options); + + apply(compiler: Compiler): void; }