Skip to content

Commit 2fd5890

Browse files
committed
lib: remove globalPreload support
Since the loader is now stable, the warning when using globalPreload is no longer necessary.
1 parent 462c741 commit 2fd5890

File tree

1 file changed

+0
-10
lines changed

1 file changed

+0
-10
lines changed

lib/internal/modules/esm/hooks.js

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -646,16 +646,12 @@ class HooksProxy {
646646
}
647647
ObjectSetPrototypeOf(HooksProxy.prototype, null);
648648

649-
// TODO(JakobJingleheimer): Remove this when loaders go "stable".
650-
let globalPreloadWarningWasEmitted = false;
651-
652649
/**
653650
* A utility function to pluck the hooks from a user-defined loader.
654651
* @param {import('./loader.js).ModuleExports} exports
655652
* @returns {ExportedHooks}
656653
*/
657654
function pluckHooks({
658-
globalPreload,
659655
initialize,
660656
resolve,
661657
load,
@@ -671,12 +667,6 @@ function pluckHooks({
671667

672668
if (initialize) {
673669
acceptedHooks.initialize = initialize;
674-
} else if (globalPreload && !globalPreloadWarningWasEmitted) {
675-
process.emitWarning(
676-
'`globalPreload` has been removed; use `initialize` instead.',
677-
'UnsupportedWarning',
678-
);
679-
globalPreloadWarningWasEmitted = true;
680670
}
681671

682672
return acceptedHooks;

0 commit comments

Comments
 (0)