Skip to content
This repository was archived by the owner on Apr 16, 2020. It is now read-only.

Commit 59c9b8d

Browse files
guybedfordMylesBorins
authored andcommitted
esm: add experimental warning for --loader
1 parent 7d40f06 commit 59c9b8d

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lib/internal/process/esm_loader.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ const {
77
ERR_INVALID_TYPE_FLAG,
88
ERR_VM_DYNAMIC_IMPORT_CALLBACK_MISSING,
99
} = require('internal/errors').codes;
10+
const { emitExperimentalWarning } = require('internal/util');
1011

1112
const type = require('internal/options').getOptionValue('--type');
1213
if (type && type !== 'commonjs' && type !== 'module')
@@ -48,6 +49,7 @@ exports.initializeLoader = function(cwd, userLoader) {
4849
let ESMLoader = new Loader();
4950
const loaderPromise = (async () => {
5051
if (userLoader) {
52+
emitExperimentalWarning('--loader');
5153
const hooks = await ESMLoader.import(
5254
userLoader, pathToFileURL(`${cwd}/`).href);
5355
ESMLoader = new Loader();

0 commit comments

Comments
 (0)