File tree 1 file changed +3
-3
lines changed
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) {
37
37
module . exports = function ( compiler , options ) {
38
38
if ( ! options ) options = { } ;
39
39
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 ) ;
40
43
if ( typeof options . watchDelay !== "undefined" ) {
41
44
// TODO remove this in next major version
42
45
options . warn ( "options.watchDelay is deprecated: Use 'options.watchOptions.aggregateTimeout' instead" ) ;
@@ -53,9 +56,6 @@ module.exports = function(compiler, options) {
53
56
options . filename = new RegExp ( "^[\/]{0,1}" + str + "$" ) ;
54
57
}
55
58
}
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 ) ;
59
59
if ( typeof compiler . outputPath === "string" && ! path . isAbsolute ( compiler . outputPath ) ) {
60
60
throw new Error ( "`output.path` needs to be an absolute path or `/`." ) ;
61
61
}
You can’t perform that action at this time.
0 commit comments