From: =?utf-8?q?Bastien_Roucari=C3=A8s?= <rouca@debian.org>
Date: Tue, 24 Feb 2026 12:11:08 +0100
Subject: ci: use node 24 (#5949)

origin: backport, https://github.com/rollup/rollup/commit/2491b315c11bf45aa9fa5e29d51beb7958aebfa5
---
 cli/run/loadConfigFile.ts | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/cli/run/loadConfigFile.ts b/cli/run/loadConfigFile.ts
index feb08ff..ed42693 100644
--- a/cli/run/loadConfigFile.ts
+++ b/cli/run/loadConfigFile.ts
@@ -61,7 +61,10 @@ async function getConfigFileExport(
 	}
 	let cannotLoadEsm = false;
 	const handleWarning = (warning: Error): void => {
-		if (warning.message.includes('To load an ES module')) {
+		if (
+			warning.message?.includes('To load an ES module') ||
+			warning.message?.includes('Failed to load the ES module')
+		) {
 			cannotLoadEsm = true;
 		}
 	};
