Skip to content

Commit

Permalink
Avoid error on missing getLogger (v8)
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolo-ribaudo committed Sep 16, 2024
1 parent 1cc0753 commit 3de2fdf
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,10 @@ function makeLoader(callback) {

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

let loaderOptions = loaderUtils.getOptions(this);

Expand Down

0 comments on commit 3de2fdf

Please sign in to comment.