From aa84971257160fb27ff851670190b46638bb14ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=B2=20Ribaudo?= Date: Mon, 16 Sep 2024 15:26:56 +0200 Subject: [PATCH] Avoid error on missing `getLogger` (v8) --- src/index.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/index.js b/src/index.js index eb4fcda0..b1d41f76 100644 --- a/src/index.js +++ b/src/index.js @@ -54,7 +54,9 @@ 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);