node:module exports createRequire, isBuiltin, builtinModules, and the rest of Node’s module helpers.
Differences from Node
createRequirereturns the realm’srequire; relative paths do not resolve against the filename passed to it.syncBuiltinESMExports()is a no-op.findSourceMap()returnsundefined;getSourceMapsSupport()reports source maps disabled.- Loader customization hooks (
register) are not supported. require.resolve()returns the specifier unchanged for built-ins.