module.registerHooks(options)
稳定性: 1.2 - 发布候选版
options<Object>load<Function> | <undefined> 参见 加载钩子。默认值:undefined。resolve<Function> | <undefined> 参见 解析钩子。默认值:undefined。
- 返回:<Object> 一个具有以下属性的对象:
deregister()<Function> 移除已注册的钩子,使其不再被调用。否则,钩子会在运行进程的整个生命周期内保留。
注册 钩子,用于自定义 Node.js 模块解析和加载行为。 参见 自定义钩子。返回的对象可以用于 注销钩子。
🌐 Register hooks that customize Node.js module resolution and loading behavior. See Customization hooks. The returned object can be used to deregister the hooks.