Skip to content

Commit aa84971

Browse files
Avoid error on missing getLogger (v8)
1 parent 1cc0753 commit aa84971

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/index.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,9 @@ function makeLoader(callback) {
5454

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

5961
let loaderOptions = loaderUtils.getOptions(this);
6062

0 commit comments

Comments
 (0)