import * as webpack from 'webpack' ; import { ITerminalProvider , TerminalProviderSeverity } from '@rushstack/node-core-library' ; export class LoaderTerminalProvider { public static getTerminalProviderForLoader ( loaderContext ) { return { supportsColor : false , eolCharacter : '\n' , write : ( data , severity ) => { switch ( severity ) { case TerminalProviderSeverity . error : { loaderContext . emitError ( new Error ( data ) ) ; break ; } case TerminalProviderSeverity . warning : { loaderContext . emitWarning ( new Error ( data ) ) ; break ; } } } } ; } }