Skip to content

Commit ea8000f

Browse files
committed
lib: lazy load internal/queue_microtask
PR-URL: #23046 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: John-David Dalton <[email protected]> Reviewed-By: Gireesh Punathil <[email protected]>
1 parent 7dde560 commit ea8000f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Diff for: lib/internal/bootstrap/node.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -529,11 +529,12 @@
529529
}
530530

531531
function setupQueueMicrotask() {
532-
const { queueMicrotask } = NativeModule.require('internal/queue_microtask');
533532
Object.defineProperty(global, 'queueMicrotask', {
534533
get: () => {
535534
process.emitWarning('queueMicrotask() is experimental.',
536535
'ExperimentalWarning');
536+
const { queueMicrotask } =
537+
NativeModule.require('internal/queue_microtask');
537538
Object.defineProperty(global, 'queueMicrotask', {
538539
value: queueMicrotask,
539540
writable: true,

0 commit comments

Comments
 (0)