import type ChainConfig from 'webpack-chain' ; export abstract class AnalyzePlugin { requireDeps ? : string [ ] ; protected options ? ; protected abstract plugin ; patchConfig = ( config ) : ChainConfig => { return this . patchConfigInternal ( config ) ; } ; afterBuild = ( ) : PromiseLike < any > => { return Promise . resolve ( ) ; } ; protected patchConfigInternal ( config ) { config . plugin ( 'analyze' ) . use ( this . plugin , this . options ) ; return config ; } }