From 9bfff20df433ec9643a644f2eac3cd1d52b10b95 Mon Sep 17 00:00:00 2001 From: Shelley Vohr Date: Sun, 26 Oct 2025 08:27:57 +0100 Subject: [PATCH] src: conditionally disable source phase imports by default MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR-URL: https://github.com/nodejs/node/pull/60364 Refs: https://chromium-review.googlesource.com/c/v8/v8/+/7003082 Reviewed-By: Guy Bedford Reviewed-By: Michaƫl Zasso Reviewed-By: Chengzhong Wu --- src/node.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/node.cc b/src/node.cc index 72d6973723a..a18660d388b 100644 --- a/src/node.cc +++ b/src/node.cc @@ -780,7 +780,10 @@ static ExitCode ProcessGlobalArgsInternal(std::vector* args, env_opts->abort_on_uncaught_exception = true; } - v8_args.emplace_back("--js-source-phase-imports"); + if (std::ranges::find(v8_args, "--no-js-source-phase-imports") == + v8_args.end()) { + v8_args.emplace_back("--js-source-phase-imports"); + } #ifdef __POSIX__ // Block SIGPROF signals when sleeping in epoll_wait/kevent/etc. Avoids the