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
This commit is contained in:
@@ -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"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user