File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -37,6 +37,9 @@ var defaultReporter = function(reporterOptions) {
3737module . exports = function ( compiler , options ) {
3838 if ( ! options ) options = { } ;
3939 if ( typeof options . watchOptions === "undefined" ) options . watchOptions = { } ;
40+ if ( typeof options . reporter !== "function" ) options . reporter = defaultReporter ;
41+ if ( typeof options . log !== "function" ) options . log = console . log . bind ( console ) ;
42+ if ( typeof options . warn !== "function" ) options . warn = console . warn . bind ( console ) ;
4043 if ( typeof options . watchDelay !== "undefined" ) {
4144 // TODO remove this in next major version
4245 options . warn ( "options.watchDelay is deprecated: Use 'options.watchOptions.aggregateTimeout' instead" ) ;
@@ -53,9 +56,6 @@ module.exports = function(compiler, options) {
5356 options . filename = new RegExp ( "^[\/]{0,1}" + str + "$" ) ;
5457 }
5558 }
56- if ( typeof options . reporter !== "function" ) options . reporter = defaultReporter ;
57- if ( typeof options . log !== "function" ) options . log = console . log . bind ( console ) ;
58- if ( typeof options . warn !== "function" ) options . warn = console . warn . bind ( console ) ;
5959 if ( typeof compiler . outputPath === "string" && ! path . isAbsolute ( compiler . outputPath ) ) {
6060 throw new Error ( "`output.path` needs to be an absolute path or `/`." ) ;
6161 }
You can’t perform that action at this time.
0 commit comments