From c160ea11e4ece4db52731ac8b83dd09ca2d1ef11 Mon Sep 17 00:00:00 2001 From: Oisin Canty Date: Mon, 24 May 2021 09:01:42 +0000 Subject: Node.js: renamed "require_shim" to "loader". --- src/nodejs/unit-http/require_shim.mjs | 18 ------------------ 1 file changed, 18 deletions(-) delete mode 100644 src/nodejs/unit-http/require_shim.mjs (limited to 'src/nodejs/unit-http/require_shim.mjs') diff --git a/src/nodejs/unit-http/require_shim.mjs b/src/nodejs/unit-http/require_shim.mjs deleted file mode 100644 index 067d63d4..00000000 --- a/src/nodejs/unit-http/require_shim.mjs +++ /dev/null @@ -1,18 +0,0 @@ -// must be ran as part of a --loader or --experimental-loader param -export async function resolve(specifier, context, defaultResolver) { - switch (specifier) { - case "websocket": - return { - url: new URL("./websocket.js", import.meta.url).href, - format: "cjs" - } - - case "http": - return { - url: new URL("./http.js", import.meta.url).href, - format: "cjs" - } - } - - return defaultResolver(specifier, context, defaultResolver) -} -- cgit