Skip to content

Commit 7495bbd

Browse files
committed
src: conditionally disable source phase imports by default
1 parent 82fc81c commit 7495bbd

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/node.cc

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -780,7 +780,10 @@ static ExitCode ProcessGlobalArgsInternal(std::vector<std::string>* args,
780780
env_opts->abort_on_uncaught_exception = true;
781781
}
782782

783-
v8_args.emplace_back("--js-source-phase-imports");
783+
if (std::ranges::find(v8_args, "--no-js-source-phase-imports") ==
784+
v8_args.end()) {
785+
v8_args.emplace_back("--js-source-phase-imports");
786+
}
784787

785788
#ifdef __POSIX__
786789
// Block SIGPROF signals when sleeping in epoll_wait/kevent/etc. Avoids the

0 commit comments

Comments
 (0)