Skip to content

Commit 572549e

Browse files
committed
--experimental-detect-module flag
1 parent e4a0c81 commit 572549e

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

src/node_options.cc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -347,6 +347,11 @@ EnvironmentOptionsParser::EnvironmentOptionsParser() {
347347
&EnvironmentOptions::conditions,
348348
kAllowedInEnvvar);
349349
AddAlias("-C", "--conditions");
350+
AddOption("--experimental-detect-module",
351+
"when ambiguous modules fail to evaluate because they contain "
352+
"ES module syntax, try again to evaluate them as ES modules",
353+
&EnvironmentOptions::detect_module,
354+
kAllowedInEnvvar);
350355
AddOption("--diagnostic-dir",
351356
"set dir for all output files"
352357
" (default: current working directory)",

src/node_options.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ class EnvironmentOptions : public Options {
104104
public:
105105
bool abort_on_uncaught_exception = false;
106106
std::vector<std::string> conditions;
107+
bool detect_module = false;
107108
std::string dns_result_order;
108109
bool enable_source_maps = false;
109110
bool experimental_fetch = true;

0 commit comments

Comments
 (0)