Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
lib: add warning on dynamic import es modules
  • Loading branch information
juanarbol committed Nov 29, 2019
commit bfc3e7f01f8838d901bdc44883e95c0dbd2a6cb4
3 changes: 3 additions & 0 deletions lib/internal/process/esm_loader.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ exports.initializeImportMetaObject = function(wrap, meta) {

exports.importModuleDynamicallyCallback = async function(wrap, specifier) {
assert(calledInitialize === true || !userLoader);
process.emitWarning(
'The ESM module loader is experimental.',
'ExperimentalWarning', undefined);
Comment thread
juanarbol marked this conversation as resolved.
Outdated
const { callbackMap } = internalBinding('module_wrap');
if (callbackMap.has(wrap)) {
const { importModuleDynamically } = callbackMap.get(wrap);
Expand Down