diff --git a/lib/internal/process/esm_loader.js b/lib/internal/process/esm_loader.js index ed387a1554..803c854d9a 100644 --- a/lib/internal/process/esm_loader.js +++ b/lib/internal/process/esm_loader.js @@ -7,6 +7,7 @@ const { ERR_INVALID_TYPE_FLAG, ERR_VM_DYNAMIC_IMPORT_CALLBACK_MISSING, } = require('internal/errors').codes; +const { emitExperimentalWarning } = require('internal/util'); const type = require('internal/options').getOptionValue('--type'); if (type && type !== 'commonjs' && type !== 'module') @@ -48,6 +49,7 @@ exports.initializeLoader = function(cwd, userLoader) { let ESMLoader = new Loader(); const loaderPromise = (async () => { if (userLoader) { + emitExperimentalWarning('--loader'); const hooks = await ESMLoader.import( userLoader, pathToFileURL(`${cwd}/`).href); ESMLoader = new Loader();