diff --git a/lib/internal/process/esm_loader.js b/lib/internal/process/esm_loader.js index b2415ec171f985..72d39a69600d88 100644 --- a/lib/internal/process/esm_loader.js +++ b/lib/internal/process/esm_loader.js @@ -48,7 +48,7 @@ exports.ESMLoader = undefined; exports.setup = function() { let ESMLoader = new Loader(); const loaderPromise = (async () => { - const userLoader = process.binding('config').userLoader; + const userLoader = internalBinding('options').getOptions('--loader'); if (userLoader) { const hooks = await ESMLoader.import( userLoader, pathToFileURL(`${process.cwd()}/`).href);