From bd80039e07500021664a10984977cf64902a4b81 Mon Sep 17 00:00:00 2001 From: Andrei Zeliankou Date: Thu, 2 Jun 2022 11:48:27 +0100 Subject: Node.js: fixed ES modules format in loader.mjs. Before Node.js v16.14.0 the "format" value in defaultResolve was ignored so error was hidden. For more information see: https://github.com/nodejs/node/pull/40980 --- src/nodejs/unit-http/loader.mjs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/nodejs/unit-http/loader.mjs') diff --git a/src/nodejs/unit-http/loader.mjs b/src/nodejs/unit-http/loader.mjs index 067d63d4..546548f5 100644 --- a/src/nodejs/unit-http/loader.mjs +++ b/src/nodejs/unit-http/loader.mjs @@ -4,13 +4,13 @@ export async function resolve(specifier, context, defaultResolver) { case "websocket": return { url: new URL("./websocket.js", import.meta.url).href, - format: "cjs" + format: "commonjs" } case "http": return { url: new URL("./http.js", import.meta.url).href, - format: "cjs" + format: "commonjs" } } -- cgit