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

Commit

Permalink
esm: add experimental warning for --loader
Browse files Browse the repository at this point in the history
  • Loading branch information
guybedford authored and MylesBorins committed Mar 6, 2019
1 parent 7d40f06 commit 59c9b8d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/internal/process/esm_loader.js
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down Expand Up @@ -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();
Expand Down

0 comments on commit 59c9b8d

Please sign in to comment.