File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
packages/purgecss-webpack-plugin/__tests__ Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change 11import * as path from "path" ;
22import fs from "fs" ;
33import { promisify } from "util" ;
4- import webpack , { Configuration , Stats } from "webpack" ;
4+ import webpack , { Configuration } from "webpack" ;
55
66const asyncFs = {
77 readdir : promisify ( fs . readdir ) ,
88} ;
99
10- function runWebpack ( options : Configuration ) : Promise < webpack . Stats > {
10+ function runWebpack (
11+ options : Configuration
12+ ) : Promise < webpack . Stats | undefined > {
1113 const compiler = webpack ( options ) ;
12- return new Promise < webpack . Stats > ( ( resolve , reject ) => {
13- compiler . run ( ( err ?: Error , stats ?: Stats ) => {
14+ return new Promise ( ( resolve , reject ) => {
15+ compiler . run ( ( err , stats ) => {
1416 if ( err ) reject ( err ) ;
1517 if ( stats ?. hasErrors ( ) ) reject ( new Error ( stats . toString ( ) ) ) ;
1618 resolve ( stats ) ;
You can’t perform that action at this time.
0 commit comments