File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change 11const { spawn } = require ( 'child_process' ) ;
22const fs = require ( 'fs' ) ;
3+ const util = require ( "util" ) ;
34const path = require ( 'path' ) ;
45const commandExistsSync = require ( 'command-exists' ) . sync ;
56const chalk = require ( 'chalk' ) ;
67const Watchpack = require ( 'watchpack' ) ;
78const which = require ( 'which' ) ;
89const { homedir } = require ( 'os' ) ;
910
11+ const stat = util . promisify ( fs . stat ) ;
12+
1013const error = msg => console . error ( chalk . bold . red ( msg ) ) ;
1114let info = msg => console . log ( chalk . bold . blue ( msg ) ) ;
1215
@@ -150,7 +153,7 @@ class WasmPackPlugin {
150153 _compile ( watching ) {
151154 info ( `ℹ️ Compiling your crate in ${ this . isDebug ? 'development' : 'release' } mode...\n` ) ;
152155
153- return fs . promises . stat ( this . crateDirectory ) . then ( stats => {
156+ return stat ( this . crateDirectory ) . then ( stats => {
154157 if ( ! stats . isDirectory ( ) ) {
155158 throw new Error ( `${ this . crateDirectory } is not a directory` ) ;
156159 }
You can’t perform that action at this time.
0 commit comments