diff --git a/doc/api/esm.md b/doc/api/esm.md index e9b38735bef990..2a37040798d209 100644 --- a/doc/api/esm.md +++ b/doc/api/esm.md @@ -33,8 +33,8 @@ node --experimental-modules my-app.mjs ### Supported Only the CLI argument for the main entry point to the program can be an entry -point into an ESM graph. Dynamic import can also be used with the flag -`--harmony-dynamic-import` to create entry points into ESM graphs at runtime. +point into an ESM graph. Dynamic import can also be used to create entry points +into ESM graphs at runtime. ### Unsupported diff --git a/src/node.cc b/src/node.cc index bcb764e400aea7..e86e48060c3ce8 100644 --- a/src/node.cc +++ b/src/node.cc @@ -3678,6 +3678,8 @@ static void ParseArgs(int* argc, config_preserve_symlinks = true; } else if (strcmp(arg, "--experimental-modules") == 0) { config_experimental_modules = true; + new_v8_argv[new_v8_argc] = "--harmony-dynamic-import"; + new_v8_argc += 1; } else if (strcmp(arg, "--experimental-vm-modules") == 0) { config_experimental_vm_modules = true; } else if (strcmp(arg, "--loader") == 0) { diff --git a/test/es-module/test-esm-dynamic-import.js b/test/es-module/test-esm-dynamic-import.js index 997eed289eb931..9c4d48aaf02da6 100644 --- a/test/es-module/test-esm-dynamic-import.js +++ b/test/es-module/test-esm-dynamic-import.js @@ -1,4 +1,4 @@ -// Flags: --experimental-modules --harmony-dynamic-import +// Flags: --experimental-modules 'use strict'; const common = require('../common'); const assert = require('assert');