Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit e341bbe

Browse files
committedSep 16, 2024··
Avoid error on missing getLogger (#1044)
1 parent d280ee3 commit e341bbe

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)
Please sign in to comment.