diff options
Diffstat (limited to 'src/node_options.cc')
-rw-r--r-- | src/node_options.cc | 21 |
1 files changed, 3 insertions, 18 deletions
diff --git a/src/node_options.cc b/src/node_options.cc index 671cdc591e0..abbb7bc82ab 100644 --- a/src/node_options.cc +++ b/src/node_options.cc @@ -92,20 +92,7 @@ void EnvironmentOptions::CheckOptions(std::vector<std::string>* errors) { } } - if (!es_module_specifier_resolution.empty()) { - if (!experimental_specifier_resolution.empty()) { - errors->push_back( - "bad option: cannot use --es-module-specifier-resolution" - " and --experimental-specifier-resolution at the same time"); - } else { - experimental_specifier_resolution = es_module_specifier_resolution; - if (experimental_specifier_resolution != "node" && - experimental_specifier_resolution != "explicit") { - errors->push_back( - "invalid value for --es-module-specifier-resolution"); - } - } - } else if (!experimental_specifier_resolution.empty()) { + if (!experimental_specifier_resolution.empty()) { if (experimental_specifier_resolution != "node" && experimental_specifier_resolution != "explicit") { errors->push_back( @@ -368,10 +355,8 @@ EnvironmentOptionsParser::EnvironmentOptionsParser() { "either 'explicit' (default) or 'node'", &EnvironmentOptions::experimental_specifier_resolution, kAllowedInEnvironment); - AddOption("--es-module-specifier-resolution", - "", - &EnvironmentOptions::es_module_specifier_resolution, - kAllowedInEnvironment); + AddAlias("--es-module-specifier-resolution", + "--experimental-specifier-resolution"); AddOption("--no-deprecation", "silence deprecation warnings", &EnvironmentOptions::no_deprecation, |