Skip to content

Commit 5e5dd0c

Browse files
Avoid error on missing getLogger (v9) (#1045)
1 parent d280ee3 commit 5e5dd0c

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/index.js

+4-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,10 @@ function makeLoader(callback) {
5353

5454
async function loader(source, inputSourceMap, overrides) {
5555
const filename = this.resourcePath;
56-
const logger = this.getLogger("babel-loader");
56+
const logger =
57+
typeof this.getLogger === "function"
58+
? this.getLogger("babel-loader")
59+
: { debug: () => {} };
5760

5861
let loaderOptions = this.getOptions();
5962
validateOptions(schema, loaderOptions, {

0 commit comments

Comments
 (0)