Skip to content

Commit dec12c5

Browse files
committed
fixup! sea: suppress builtin warning with disableExperimentalSEAWarning option
Signed-off-by: koooge <[email protected]>
1 parent 8400ff3 commit dec12c5

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/internal/main/embedding.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ const { codes: {
3030
prepareMainThreadExecution(false, true);
3131

3232
const isLoadingSea = isSea();
33+
const isBuiltinWarningNeeded = isLoadingSea && isExperimentalSeaWarningNeeded()
3334
if (isExperimentalSeaWarningNeeded()) {
3435
emitExperimentalWarning('Single executable application');
3536
}
@@ -98,7 +99,7 @@ let warnedAboutBuiltins = false;
9899
function embedderRequire(id) {
99100
const normalizedId = normalizeRequirableId(id);
100101
if (!normalizedId) {
101-
if (isLoadingSea && isExperimentalSeaWarningNeeded() && !warnedAboutBuiltins) {
102+
if (isBuiltinWarningNeeded && !warnedAboutBuiltins) {
102103
emitWarningSync(
103104
'Currently the require() provided to the main script embedded into ' +
104105
'single-executable applications only supports loading built-in modules.\n' +

0 commit comments

Comments
 (0)