File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -98,7 +98,7 @@ let warnedAboutBuiltins = false;
98
98
function embedderRequire ( id ) {
99
99
const normalizedId = normalizeRequirableId ( id ) ;
100
100
if ( ! normalizedId ) {
101
- if ( isLoadingSea && ! warnedAboutBuiltins ) {
101
+ if ( isLoadingSea && isExperimentalSeaWarningNeeded && ! warnedAboutBuiltins ) {
102
102
emitWarningSync (
103
103
'Currently the require() provided to the main script embedded into ' +
104
104
'single-executable applications only supports loading built-in modules.\n' +
Original file line number Diff line number Diff line change @@ -10,9 +10,9 @@ const builtinWarning =
10
10
To load a module from disk after the single executable application is launched, use require("module").createRequire().
11
11
Support for bundled module loading or virtual file systems are under discussions in https://github.com/nodejs/single-executable` ;
12
12
13
- expectWarning ( 'Warning' , builtinWarning ) ; // Triggered by require() calls below.
14
13
// This additionally makes sure that no unexpected warnings are emitted.
15
14
if ( ! createdRequire ( './sea-config.json' ) . disableExperimentalSEAWarning ) {
15
+ expectWarning ( 'Warning' , builtinWarning ) ; // Triggered by require() calls below.
16
16
expectWarning ( 'ExperimentalWarning' ,
17
17
'Single executable application is an experimental feature and ' +
18
18
'might change at any time' ) ;
You can’t perform that action at this time.
0 commit comments