import type { Compiler , MultiCompiler } from 'webpack' ; export const closeWebpack = ( compiler ) => { return new Promise < void > ( ( resolve , reject ) => { compiler . close ( ( error ) => { if ( error ) { return reject ( error ) ; } resolve ( ) ; } ) ; } ) ; } ;