vm.constants.USE_MAIN_CONTEXT_DEFAULT_LOADER


稳定性: 1.1 - 处于活跃开发中

一个常量,可用作 vm.Scriptvm.compileFunction()importModuleDynamically 选项,以便 Node.js 从主上下文使用默认的 ESM 加载器来加载请求的模块。

【A constant that can be used as the importModuleDynamically option to vm.Script and vm.compileFunction() so that Node.js uses the default ESM loader from the main context to load the requested module.】

有关详细信息,请参见 在编译 API 中支持动态 import()

【For detailed information, see Support of dynamic import() in compilation APIs.】